Download MetaTrader 5
To add comments, please log in or register
Having questions to the author of an article? Discuss them on the Forum!
creep01
22
creep01 2014.10.13 23:28 
Hi all, could you check this code for me?

It is supposed to alert when RSI and stoch are above their overbought (or below oversold) levels and if the price closes above bollinger. It is only supposed to look at values at price close. As of now, I still get alerts if the values say fluctuated above 70 for rsi, or above 80 for stoch, or above the upper band but they didn't finish above, yet I still get the signal? I'm fairly new at this so some help would be greatly appreciated.

Files:
Keith Watford
Moderator
8000
Keith Watford 2014.10.14 06:33  

I haven't looked closely at your code, but if you only want to check closed bars, use index(shift) 1 not 0.

  //---------------------------------------------------------------- 
   double RSI_Price = iRSI(NULL,0,14,0,0);
   double STOC_Price = iStochastic(NULL,0,5,3,3,0,0,0,0);
   double BOLI_Price_UP = iBands(NULL,0,20,2,0,0,1,0);
   double BOLI_Price_DOWN = iBands(NULL,0,20,2,0,0,2,0);
   
  //---------------------------------------------------------------- 

 


 

creep01
22
creep01 2014.10.15 05:19  
GumRai:

I haven't looked closely at your code, but if you only want to check closed bars, use index(shift) 1 not 0.

 Oh, I didn't know that, thanks


 

/
To add comments, please log in or register