Code to set stop buy and stop sell orders at a specific time based on previous candle close

Created at 17 Sep 2023, 14:22
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!
JO

jonothancannon

Joined 17.09.2023

Code to set stop buy and stop sell orders at a specific time based on previous candle close
17 Sep 2023, 14:22


Hello everyone,

I've been trying to build a cBot that can set stop buy and stop sell orders at a specific time based on the previous candle close but have been struggling to find the right commands to make it work.

 

Can anyone point me in the right direction? I would really appreciate it.

 

As an example of what I'm trying to do:

I want to set a stop buy 2 points above the previous candle close and a stop sell 2 points below the previous candle close at a specific time of day.

I would also like to set the stop loss of the stop buy 2 points below the previous candle close, and the stop loss of the stop sell 2 points above the previous candle close.

Thank you in advance!


@jonothancannon
Replies

PanagiotisChar
18 Sep 2023, 05:28

Hi there,

Which exact commands are you looking for?

 


@PanagiotisChar