# Bollinger logic

454

Hello everyone,

I am trying to figure out how exactly this indicator works. It appears to deal with UPPER and LOWER values.

2729

Wikipedia:  Bollinger Bands

Search CodeBase for the source code.

Bollinger Bands - Trend Indicators - Technical Indicators - Price Charts, Technical and Fundamental Analysis - MetaTrader 5 Help
Bollinger Bands (BB) are 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. Standard deviation is a measure of volatility, therefore Bollinger Bands adjust themselves to...
16279

GrumpyDuckMan: I am trying to figure out how exactly this indicator works. It appears to deal with UPPER and LOWER values.

Not just

mode [in] Indicator line index. It can be any of the Indicators line identifiers enumeration value (0 - MODE_MAIN, 1 - MODE_UPPER, 2 - MODE_LOWER).
iBands - Technical Indicators - MQL4 Reference

454

Drazen Penic:

Wikipedia:  Bollinger Bands

Search CodeBase for the source code.

Hello again,

I found this.

454

whroeder1:

Not just

Got it.

whroeder1, I was lead to believe that MFI was also some how involved.

FYI: I like PDF's, not Wikipedia

454

whroeder1:

Not just

```   Band_Mode = iBands(NULL,Timeframe,period,Deviation,0,PRICE_CLOSE,MODE_MAIN,0);
Band_High = iBands(NULL,Timeframe,period,Deviation,0,PRICE_CLOSE,MODE_UPPER,0);
Band_Low  = iBands(NULL,Timeframe,period,Deviation,0,PRICE_CLOSE,MODE_LOWER,0);

Percent   = Band_High-Band_Low;
Result    = Percent/Band_Mode;```
still work in progress.
2729

BB midline is moving average, and distance from midline to upper and lower lines is equal to a standard deviation multiplied by some coefficient. That's the math formula behind BB construction. Nothing special.

If you are looking for a BB trading strategy, a simple search will return dozens.

63796

GrumpyDuckMan:
still work in progress.

Bollinger is simply  this :

- SMA for middle value

- SMA + bands multiplier * standard deviation (upper band)

- SMA - bands multiplier * standard deviation (lower band)

454

Bollinger is simply  this :

- SMA for middle value

- SMA + bands multiplier * standard deviation (upper band)

- SMA - bands multiplier * standard deviation (lower band)

SMA and MODE_MAIN look the same. Can you please explain your simplified basis?
454

GrumpyDuckMan:
SMA and MODE_MAIN look the same. Can you please explain your simplified basis?
oops, I think I found what you are talking about now.