Download MetaTrader 5

Question about this code

To add comments, please log in or register
Why to sell products in MetaTrader AppStore? Find that out from the article!
Cuong Truong
4245
Cuong Truong 2015.09.04 13:36 

I'm currently writing code for a new EA.

I wanted to write a code to place a buy order only if RSI crossed down below 50 level, and then cross back up over the 50 level. After RSI crossed back up above 50 level then place a buy order

Is this the right line to use?

if((iRSI(NULL,0,10,PRICE_MEDIAN,0)<50)&&(iRSI(NULL,0,10,PRICE_MEDIAN,0)>50))

Sherif Hasan
7290
Sherif Hasan 2015.09.04 19:02  
if ((iRSI(NULL, NULL,10,PRICE_MEDIAN,1) < 50) && (iRSI(NULL, NULL,10,PRICE_MEDIAN,0) > 50))  //Previous Candle Closed below <50 level and Current Candle Cross up >50 Level.
To add comments, please log in or register