Bollinger Bands
<< Click to Display Table of Contents >> Bollinger Bands |
Developed by John Bollinger, Bollinger Bands are an indicator that allows users to compare volatility and relative price levels over a period time. The indicator consists of three bands designed to encompass the majority of a security's price action.
1.A simple moving average in the middle
2.An upper band (SMA plus 2 standard deviations)
3.A lower band (SMA minus 2 standard deviations)
Standard deviation is a statistical unit of measure that provides a good assessment of a price plot's volatility. Using the standard deviation ensures that the bands will react quickly to price movements and reflect periods of high and low volatility. Sharp price increases (or decreases), and hence volatility, will lead to a widening of the bands.
... Courtesy of StockCharts
Bollinger(double numStdDev, int period)
Bollinger(ISeries<double> input, double numStdDev, int period)
Returns upper band value
Bollinger(double numStdDev, int period).Upper[int barsAgo]
Bollinger(ISeries<double> input, double numStdDev, int period).Upper[int barsAgo]
Returns lower band value
Bollinger(double numStdDev, int period).Lower[int barsAgo]
Bollinger(ISeries<double> input, double numStdDev, int period).Lower[int barsAgo]
double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.
input |
Indicator source data (?) |
period |
Number of bars used in the calculation |
// Prints the current upper band value of a 20 period Bollinger using default price type |
You can view this indicator method source code by selecting the menu New > NinjaScript Editor > Indicators within the NinjaTrader Control Center window.