BUY/SELL SCRIPT REQUIRED FOR PI ZERODHA

Dear I need buy script for following condition for PI (zerodha)
for buy

  1. 1 Minute chart. Check Volume Increase from last 1 minute bar X 10 times
    2.if yes 10 times, then check whether price have increased in previous two 1 minute bars
  2. if yes check holdings
  3. if holds 9000 qty then sell at market price
  4. if not then buy 9000 qty

for sell

  1. 1 Minute chart. Check Volume Increase from last 1 minute bar X 10 times
    2.if yes 10 times, then check whether price have decreased in previous two 1 minute bars
  2. if yes check holdings
  3. if holds 9000 qty then sell at market price
  4. if not then sell 9000 qty