Stop Loss not set

Created at 02 Oct 2024, 07:07
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!
TO

Tom55

Joined 02.10.2024

Stop Loss not set
02 Oct 2024, 07:07


In a bot i set orders with the async method. Sometimes it seams that the stop loss is not set. Which event gives me this information? Or how can I check if the stop loss is set when the order is executed? 

Thanks for your help!

Tom


@Tom55
Replies

firemyst
03 Oct 2024, 00:07

Get the position, and then check the stoploss value.

 

if (p.StopLoss.GetValueOrDefault() == 0)

{

    //no stoploss on the position. DO what you want to do.

}


@firemyst