The FXB.ta.Bands class calculates Bollinger bands: a moving average plus/minus a multiple of standard deviation. It is a value-based calculation, and can be applied to any series of values including the output of another FXB.ta calculation. Parameters are as follows:
| Parameter | Description |
| period | Rolling period for the calculation |
| deviations | Multiple of standard deviation (typical value is 2) |
| maType | Type of moving average. Defaults to a simple moving average (sma / 0). |
The primary output value - GetValue() - of the calculation is the moving average. The calculation also sets the signal value - GetSignalValue() - to the standard deviation. And the calculation provides some helper functions for getting the upper and lower bands:
| Parameter | Description |
| GetUpper(idx) | Gets the upper band at index #idx: the main value plus the deviations parameter times the signal value |
| GetLower(idx) | Gets the lower band at index #idx: the main value minus the deviations parameter times the signal value |
| GetUpperArray() | Returns an array of all upper-band values |
| GetLowerArray() | Returns an array of all lower-band values |