EMA crossover + RSI

Created at 22 Jun 2016, 11:37
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
AN

anurag.gakhar

Joined 01.02.2016

EMA crossover + RSI
22 Jun 2016, 11:37


Hello all,

I was wondering if somebody could help me a code the below strategy (I have no coding experience) based on EMA crossover and RSI indicator. Its a pretty common strategy and should work out in principle. 

Alternatively if you can point me to similar strategy where I can tweak it according to me needs, that would do as well.

Thanks in advance for your help.

-----------------------------------------------

Buy:

If (EMA(14)>EMA(30))  { EMA14 crosses from below EMA30 }

And RSI<=60

Open Buy position (# of lots)

Time frame (1 hour )
Set Stop Loss = Price – 50{Pips}
Set Take Profit = Price + (50*3) { It would be nice to have a trailing stop loss, move the position to breakeven after profit of 50 pips and then let it trail }
End

The strategy: If the moving average crosses points on a bullish trend and the RSI is equal or below 60 it means that the rally has some length before reaching an oversold level (RSI above 80). That points to a good buying opportunity.

Sell:

If (EMA(14)<EMA(30))  { EMA14 crosses from above EMA30 }

And RSI>=40

Open Sell position (# of lots)

Time frame (1 hour )
Set Stop Loss = Price – 50{Pips}
Set Take Profit = Price + (50*3) { It would be nice to have a trailing stop loss, move the position to breakeven after profit of 50 pips and then let it trail }
End

The strategy: If the moving average cross points on a bearish trend and the RSI is equal or above 40 it means that the rally has some length before reaching an overbought level (RSI below 20). That points to a good selling opportunity.

-----------------------------------------

Regards

Anurag Gakhar

 

 

 


@anurag.gakhar
Replies

... Deleted by UFO ...

... Deleted by UFO ...

... Deleted by UFO ...

anurag.gakhar
22 Jun 2016, 16:04

Hello Lucian,

Many thanks for the code, Really appreciate your help. I am going to test it later in the evening today. BTW, could you pls highlight the change you made in the 2nd version of the code? To me it looks the same. 


@anurag.gakhar

... Deleted by UFO ...