Need the strategy for the following

Kindly help me code the below mentioned strategy-

Buy Signal: - IF
• 20-Day EMA is above close price and
• RSI(10) is less than 55
• 7-day SMA of RSI(10) is less than RSI(10)

Sell Signal: IF
• 20 Day EMA is below close price and
• RSI(10) is above 45
• 7 day SMA of RSI(10) is greater than RSI(10)

1 Like

You can use below expression-

Buy:

SET A = (RSI(CLOSE, 10))

(CLOSE > EMA(HIGH, 20)) AND (RSI(CLOSE, 10) > 55) AND (SMA(A, 7) < RSI(CLOSE, 10))
 

Sell:


SET A = (RSI(CLOSE, 10))

(CLOSE > EMA(LOW, 20)) AND (RSI(CLOSE, 10) > 45) AND (SMA(A, 7) > RSI(CLOSE, 10))

3 Likes