Modified opening range breakout - AFL help .Thanks

Hi All ,

I am looking at a purely intraday opening range breakout strategy with some small modifications . Would like AFL codes so I can backtest .
Opening range defined by the first 10 mins .
Below are the conditions for entry and exit -
Long -

  1. Previous days close < current days opening
  2. Enter on 3rd bar after the range breakout (parameter optimized 1 bar , 2 bar , 3 bar)
  3. Breakout Bars Volume > EMA 20 of volumes (Parameter optimize 5,10,13,20)
    Short -
  4. Previous days close > Current days opening
  5. Enter on 3rd bar after range breakout (parameter optimized 1bar , 2 bars , 3 bars)
  6. Breakout Bars volume > EMA 20 of volumes (parameter optimized 5,10,13,20)

Eagerly looking forward to the code ,
Thanks and regards