I want code for backtest "Buy when 9 EMA crosses 27 EMA upward direction and STOSCHASTIC and RSI > 60" and "Sell when 9 EMA crosses 27 EMA downward direction and STOSCHASTIC and RSI < 30"

As per the above condition

Buy Script:

CROSSOVER(EMA(CLOSE,9),EMA(CLOSE,27)) AND SOPK(9, 3, 9, SIMPLE) > 60 AND RSI(CLOSE,14) > 60

Sell Script:

CROSSOVER(EMA(CLOSE,27),EMA(CLOSE,9)) AND SOPK(9, 3, 9, SIMPLE) < 30 AND RSI(CLOSE,14) < 30
1 Like

Thank You Sir…