cBotsCrash

Created at 29 Oct 2021, 12:15
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
EY

eynt

Joined 08.05.2020

cBotsCrash
29 Oct 2021, 12:15


I was running several cBots at the same time on the same account. At one point all of my cBots were stopped. I suspect it was due to an exit on a stop loss on a specific symbol (XAUAUD).

I got the following message on all symbols (this example is from NZDCAD):

"Crashed in Positions.Closed with Exception: Position closed on unknon reason.  obj.Reason= StopLoss obj.Position= PID63205674 (Sell 1 XAUAUD, SL: 2399.15, TP: 2381.16) label= IN_181".

Notice that the crash happened on NZDCAD (and all other symbols) although the message is referring to XAUAUD.

What could cause this kind of behavior? Please note that closing a position on SL is not something that should happen on my cBot (the positions should always be closed by a call from the cBot. the placed SL is only a safety mechanism). If a position is closed on SL then an exception is thrown and the Stop method might be called.

 

Thanks


@eynt
Replies

amusleh
01 Nov 2021, 08:27

Hi,

Can you please share you cBot code? or a minimum sample that can replicate this same error?


@amusleh