Code involving EMA and RSI

Hi,

I wanted two codes with a slight tweak - I've listed down the conditions below:

Buy: When the EMA 6 crosses the EMA 12 UP and at the same time RSI cross 50th level from lower to upper

Sell: When the EMA 6 crosses the EMA 12 DOWN and at the same time RSI cross 50th level from upper to lower

The 2nd one:

Buy: When the EMA 6 crosses the EMA 12 UP and at the same time RSI 10 crosses RSI 80 UP

Sell: When the EMA 6 crosses the EMA 12 DOWN and at the same time RSI 10 crosses RSI 80 DOWN

Thanks for all your help!

Regards,

Keith

As per the above condition

1st

Buy Script:

CROSSOVER(EMA(CLOSE,6),EMA(CLOSE,12)) AND RSI(CLOSE,14)>50

Sell Script:

CROSSOVER(EMA(CLOSE,12),EMA(CLOSE,6)) AND RSI(CLOSE,14)<50


2nd

Buy Script:

CROSSOVER(EMA(CLOSE,6),EMA(CLOSE,12)) AND RSI(CLOSE,10)>80

Sell Script:

CROSSOVER(EMA(CLOSE,12),EMA(CLOSE,6)) AND RSI(CLOSE,10)<80
1 Like

Thanks AlgoGeek :slight_smile:

Dear algogeek… In the above response you have given code only for Ema… Query was asking for Ema in combination with rsi… Can u pls include rsi also in that?