When SL of one position hit, exit all other positions.

Created at 12 Jul 2022, 07:11
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!
AL

Alfie

Joined 23.06.2022

When SL of one position hit, exit all other positions.
12 Jul 2022, 07:11


Hello,,

How do I build the code for exiting all other positions when SL of one of the positions get hit.?  


@Alfie
Replies

PanagiotisCharalampous
12 Jul 2022, 08:48

Hi Alfie,

You can check the position closed reason in Position.Closed event and act accordingly. Check here for an example.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous