Why EA order placing when condition not met?

Back to topics list To post a new topic, please log in or register
avatar
273
sheriffonline 2015.11.21 11:48
 

Hi!

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
        
    }



avatar
Moderator
3419
GumRai 2015.11.21 11: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. 

avatar
13006
WHRoeder 2015.11.21 13: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.
Back to topics list  

To add comments, please log in or register