Need Help with bollinger bands

 

Hello,

 

on MQL4 it was very easy to get the value of Bollinger Bands

 

   double Upper = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_UPPER,1);

   double Middle =iMA(NULL,0,20,0,MODE_SMA,PRICE_CLOSE,1);

   double Lower = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_LOWER,1);

 

hot is the same on MQL5?

just found out, that i get with iBands only the middle band

 

regards

Bollinger Bands ®
Bollinger Bands ®
  • votes: 14
  • 2010.01.26
  • MetaQuotes Software Corp.
  • www.mql5.com
The Bollinger Bands ® Indicator (BB) is similar to Envelopes. The only difference is that the bands of Envelopes are plotted a fixed distance (%) away from the moving average, while the Bollinger Bands are plotted a certain number of standard deviations away from it.
 
amando:

Hello,

 

on MQL4 it was very easy to get the value of Bollinger Bands

 

   double Upper = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_UPPER,1);

   double Middle =iMA(NULL,0,20,0,MODE_SMA,PRICE_CLOSE,1);

   double Lower = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_LOWER,1);

 

hot is the same on MQL5?

just found out, that i get with iBands only the middle band

 

regards

1. Please use SRC button when you post code.

2. Did you tried to use the search function on the site ?

3. You can find a example on that article.

Reason: