back testing codes for gap up & gap down opening

dear coders

kindly provide me codes for backtesting in zerodha PI for the following script

  1. if there is gap up opening, SELL (Sl=10 points, Target=10)
  2. If there is gapdown opening, BUY (SL=10, target=10)
    thank you team