Placing Buy/Sell-stop orders on candle opening #2

Created at 06 Sep 2021, 17:26
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!
V.

v.fiodorov83

Joined 24.07.2019

Placing Buy/Sell-stop orders on candle opening #2
06 Sep 2021, 17:26


Hi everyone!

 

This my second attempt to post here, for some reason did not work
Can't figure it out with cTrader library, poor description for me.
Therefore, please help. The tasks are pretty simple

 

How can I write a code that opens 1 buy-stop order and at the same time 1 sell-stop order that will be placed at a specified distance from the user in pips at the opening of each new candle.

For example, the user set the parameter to 1 pip and the robot simultaneously opens buy-stop and sell-stop at a distance of 1 pip from the opening price of each new candle


@v.fiodorov83