Cbot automated order

amanordarkwa since: 03 May 2023;

  03 May 2023, 10:54
Cbot automated order

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?

firemyst since: 26 Mar 2019;

  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
            }