VERSION 4.8.21 crashed with error #24874110
VERSION 4.8.21 crashed with error #24874110
16 Aug 2023, 00:09
Error in cbot when running verification test.
“CBot instance [Thebe V39, EURAUD, m5] crashed with error #24874110.”
Does anyone know the reason for this error?
In other versions of ctrader it never had a problem, after updating to version 4.8.21 it started to show this.
Replies
thebeinvest
16 Aug 2023, 01:58
RE: crashed with error #24874110
thebeinvest said:
I just did a test, and the problem no longer happens.
However, it is a protection function that I would like to continue using, I would like to return with it to the code.
Does anyone know if something is wrong?
This was in the code and was removed for the problem to disappear.
double TrailingStopPips = (result * AjstSLM2); var newStopLoss = pos.TradeType == TradeType.Buy ? Symbol.Bid - Symbol.PipSize * TrailingStopPips : Symbol.Ask + Symbol.PipSize * TrailingStopPips; var StopLoss = ModifyPosition(pos, newStopLoss, pos.TakeProfit, true); if (StopLoss.Error == ErrorCode.InvalidStopLossTakeProfit && (Account.Equity >= (Account.Balance * 1.01)) ) ClosePosition(pos);
if I simply put "FALSE", deactivating the modify position, it doesn't give the error anymore, the error is in the position modification.
Can someone help me?
If I do a ModifyPosition and change StopLoss only once, the cbot doesn't crash, however, if I activate HasTrailingStop (true), then yes, it's crashing.
Again, in other versions this did not happen.
@thebeinvest
thebeinvest
16 Aug 2023, 02:06
RE: RE: crashed with error #24874110
thebeinvest said:
thebeinvest said:
I just did a test, and the problem no longer happens.
However, it is a protection function that I would like to continue using, I would like to return with it to the code.
Does anyone know if something is wrong?
This was in the code and was removed for the problem to disappear.
double TrailingStopPips = (result * AjstSLM2); var newStopLoss = pos.TradeType == TradeType.Buy ? Symbol.Bid - Symbol.PipSize * TrailingStopPips : Symbol.Ask + Symbol.PipSize * TrailingStopPips; var StopLoss = ModifyPosition(pos, newStopLoss, pos.TakeProfit, true); if (StopLoss.Error == ErrorCode.InvalidStopLossTakeProfit && (Account.Equity >= (Account.Balance * 1.01)) ) ClosePosition(pos);
if I simply put "FALSE", deactivating the modify position, it doesn't give the error anymore, the error is in the position modification.
Can someone help me?
If I do a ModifyPosition and change StopLoss only once, the cbot doesn't crash, however, if I activate HasTrailingStop (true), then yes, it's crashing.
Again, in other versions this did not happen.
I've done the test by changing all trailingStop methods and all give the same error.
In summary, if I deactivate HasTrailing Stop (false) it works, if I activate it, it gives an error. And again... in the other versions, this didn't happen.
@thebeinvest
thebeinvest
16 Aug 2023, 02:24
RE: RE: RE: crashed with error #24874110
thebeinvest said:
thebeinvest said:
thebeinvest said:
I just did a test, and the problem no longer happens.
However, it is a protection function that I would like to continue using, I would like to return with it to the code.
Does anyone know if something is wrong?
This was in the code and was removed for the problem to disappear.
double TrailingStopPips = (result * AjstSLM2); var newStopLoss = pos.TradeType == TradeType.Buy ? Symbol.Bid - Symbol.PipSize * TrailingStopPips : Symbol.Ask + Symbol.PipSize * TrailingStopPips; var StopLoss = ModifyPosition(pos, newStopLoss, pos.TakeProfit, true); if (StopLoss.Error == ErrorCode.InvalidStopLossTakeProfit && (Account.Equity >= (Account.Balance * 1.01)) ) ClosePosition(pos);
if I simply put "FALSE", deactivating the modify position, it doesn't give the error anymore, the error is in the position modification.
Can someone help me?
If I do a ModifyPosition and change StopLoss only once, the cbot doesn't crash, however, if I activate HasTrailingStop (true), then yes, it's crashing.
Again, in other versions this did not happen.
I've done the test by changing all trailingStop methods and all give the same error.
In summary, if I deactivate HasTrailing Stop (false) it works, if I activate it, it gives an error. And again... in the other versions, this didn't happen.
Guys, I performed more tests, and found something else..
I returned my code as it was before.
But in backtesting, I activated the visual mode, and believe me, in visual mode I have no problem with backtesting, but without visual mode and also in optimization it has a problem, that is, I cannot perform optimization, nor backtesting without visual mode.
@thebeinvest
thebeinvest
16 Aug 2023, 02:32
RE: RE: RE: RE: crashed with error #24874110
thebeinvest said:
thebeinvest said:
thebeinvest said:
thebeinvest said:
I just did a test, and the problem no longer happens.
However, it is a protection function that I would like to continue using, I would like to return with it to the code.
Does anyone know if something is wrong?
This was in the code and was removed for the problem to disappear.
double TrailingStopPips = (result * AjstSLM2); var newStopLoss = pos.TradeType == TradeType.Buy ? Symbol.Bid - Symbol.PipSize * TrailingStopPips : Symbol.Ask + Symbol.PipSize * TrailingStopPips; var StopLoss = ModifyPosition(pos, newStopLoss, pos.TakeProfit, true); if (StopLoss.Error == ErrorCode.InvalidStopLossTakeProfit && (Account.Equity >= (Account.Balance * 1.01)) ) ClosePosition(pos);
if I simply put "FALSE", deactivating the modify position, it doesn't give the error anymore, the error is in the position modification.
Can someone help me?
If I do a ModifyPosition and change StopLoss only once, the cbot doesn't crash, however, if I activate HasTrailingStop (true), then yes, it's crashing.
Again, in other versions this did not happen.
I've done the test by changing all trailingStop methods and all give the same error.
In summary, if I deactivate HasTrailing Stop (false) it works, if I activate it, it gives an error. And again... in the other versions, this didn't happen.
Guys, I performed more tests, and found something else..
I returned my code as it was before.
But in backtesting, I activated the visual mode, and believe me, in visual mode I have no problem with backtesting, but without visual mode and also in optimization it has a problem, that is, I cannot perform optimization, nor backtesting without visual mode.
I have just tested it on ctrader version 4.7.13 and confirmed that backtesting works normally even without visual mode activated.
Thus confirming that version 4.8.21 brought this error bug.
Please... help me get this message to the developers, it will hurt a lot of people.
the algorithm is correct, however, with the new update it is giving this error.
@thebeinvest
PhoenixCapital
21 Aug 2023, 12:00
Yea, I am having issues with the backtest as well on the new version. Too many changes and no enough testing. How do I go back to the previous version on ctrader?
@PhoenixCapital
thebeinvest
16 Aug 2023, 00:13 ( Updated at: 16 Aug 2023, 00:42 )
I just did a test, and the problem no longer happens.
However, it is a protection function that I would like to continue using, I would like to return with it to the code.
Does anyone know if something is wrong?
This was in the code and was removed for the problem to disappear.
if I simply put "FALSE", deactivating the modify position, it doesn't give the error anymore, the error is in the position modification.
Can someone help me?
@thebeinvest