need code for following condition.
Buy - if price break previous candle high.
sell - if price break previous candle low.
need code for following condition.
Buy - if price break previous candle high.
sell - if price break previous candle low.
As per the above condition
Buy Script:
LAST > REF(HIGH,1)
Sell Script:
LAST < REF(LOW,1)
Thanks AlgoGeek.