Download MetaTrader 5
To add comments, please log in or register
Do you want to deposit to your account? Do this in any convenient way!
Sherif Hasan
Sherif Hasan 2015.11.21 10:48 


I use RSI to filter the trend to place new order.

here is i added condition for RSI to filter.

here is my condition to filter the trade:

If RSI(14)>60 >> Buy

If RSI(14)<40 >> Sell

see the image below:

it seems working wrong. Please suggest me to solve the issue. i use shift value as "0"

my code is given below:

    if (iRSI(NULL, NULL,14,PRICE_CLOSE,0) > 60)
        //Buy call
    if (iRSI(NULL, NULL,14,PRICE_CLOSE,0) < 40)
        //Sell call

Keith Watford
Keith Watford 2015.11.21 10:57  

Maybe it was below 40 at some time when the bar was current.

I will only mention using NULL for the time-frame and not comment as I have no idea whether NULL is interpreted as the current time-frame or not. 

whroeder1 2015.11.21 12:53  
  1. TF is an enumeration not a string. NULL is wrong. Use zero or PERIOD_CURRENT.
  2. Value will change multiple times as bar zero forms. If you don't want multiple signals use bar one.
To add comments, please log in or register