Indicators.BandsOnArray()

Calculates the Bollinger Bands indicator on data, stored in array, and returns its value.
Indicators.BandsOnArray(series:Array, total:int, period:int, deviations:float, bandsShift:int, mode:int)

Parameters

Name Type Действие Значение по умолчанию
series Array Array with data.
total int The number of items to be counted. 0 means the whole array.
period int Averaging period to calculate the main line.
deviations float Number of standard deviations from the main line.
bandsShift int The indicator shift relative to the chart.
mode int Indicator line index. It can be any of the Indicators line identifiers enumeration value (0 - IndicatorLine.Main, 1 - IndicatorLine.Upper, 2 - IndicatorLine.Lower).

Return value

Numerical values of the Bollinger Bands indicator, calculated on data, stored in array[].

Example

let listBands = Indicator.BandsOnArray(ExtBuffer, total, 2, 0, 0, IndicatorLine.Lower);