Cbot automated order

Created at 03 May 2023, 10:54
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!
AM

amanordarkwa

Joined 03.05.2023

Cbot automated order
03 May 2023, 10:54


I need help...
I want to write a cbot that can make pending order in a range from the open price of timeframe example 100pips from open price of Day timeframe.
This order is basically going to be stop orders (buy stop and sell stop)
Anyone can help with code?


@amanordarkwa
Replies

firemyst
26 May 2023, 03:45

RE:

amanordarkwa said:

I need help...
I want to write a cbot that can make pending order in a range from the open price of timeframe example 100pips from open price of Day timeframe.
This order is basically going to be stop orders (buy stop and sell stop)
Anyone can help with code?

Sample code to help get you started:

            if (Bars.ClosePrices.Last[0] >= Bars.OpenPrices.Last[0] + (Symbol.PipSize * 100))
            {
                //if the current close price is >= the current open price + 100 pips, place your order
            }

 


@firemyst