Need help with Code for ORB strategy

Here is the strategy: I need to open a buy position when the price goes above the high of the first 1-hour candle of the day, similarly I need to open a sell order when the current price moves below the low of the first 1 hour candle of the present day.

Once in the position (buy or sell) I need to capture the high and low of the candle (after candle closes) that crossed over the buy and sell levels. The low of this candle needs to be my stoploss when in buy position and similarly high of this candle will be my stoploss when in sell position.

Kindly help.


ORB Strategy Screening are not supported on Tradescript.

Please refer to the below FAQ’s.