Comment on Managing your Script
Assuming you want to buy/sell above the highest high/lowest low of last 3 candles.
Buy:close>hhv(3)
sell:close<llv(3)
Assuming you want to buy/sell above the highest high/lowest low of last 3 candles.
Buy:close>hhv(3)
sell:close<llv(3)