Bollinger Bands
Previous Topic  Next Topic 

Definition

Courtesy of www.stockcharts.com
Courtesy of www.marketscreen.com

Syntax

Bollinger(int period, double numStdDev)
Bollinger(IDataSeries inputData, int period, double numStdDev)

Returns upper band value
Bollinger(int period, double numStdDev).Upper[int barsAgo]
Bollinger(IDataSeries inputData, int period, double numStdDev).Upper[int barsAgo]

Returns lower band value
Bollinger(int period, double numStdDev).Lower[int barsAgo]
Bollinger(IDataSeries inputData, int period, double numStdDev).Lower[int barsAgo]


Parameters

period

The number of bars to include in the calculation

numStdDev

The number of standard deviations

inputData

Indicator source data (?)


Examples

// Prints the current upper band value of a 20 period Bollinger using default price type
double upperValue = Bollinger(20).Upper[0];
Print("The current Bollinger upper value is " + upperValue.ToString());

// Prints the current upper band value of a 20 period Bollinger using low price type
double value = Bollinger(Low, 20).Upper[0];
Print("The current Bollinger upper value is " + upperValue.ToString());


Source Code

You can open up the indicator source code via the NinjaScript Editor