i need code for this simple strategy:-
Buy:-Only when a candle open above 20 TMA
Sell:-Only when a candle open below 20 TMA
Buy exit:- When the prices goes below the low of previous candle or price open below the 20 TMA
Sell Exit:-When the prices goes above the High of previous candle or price open above the 20 TMA
It should only take one position at a time.