Free Stuff
Modified Bollinger Band Indicator
Click Here to Download For NinjaTrader 6.5
Click Here to Download For NinjaTrader 7

Typical Bollinger Bands calculate and plot three bands. The middle band is usually a form of moving average, and serves as a base for the upper and lower band. The distance between the upper/lower Bollinger Bands and the moving average is determined by volatility, which is typically defined as the standard deviation of the same data used to calculate the moving average. The code to calculate basic Bollinger Bands is similar to the following:
average = SMA(Close, 20)[0]; // calculate 20 period simple moving average
stddev = StdDev(Close, 20)[0]; // calculate 20 period standard deviation of closing prices
upperband = average + 2 * stddev; // calculate upper band
lowerband = average - 2 * stddev; // calculate lower band
In probability theory and statistics, the standard deviation is a measure of how much variance there is from the average. However, in the typical calculation for Bollinger Bands (as shown above), the standard deviation is calculated based on the difference in closing prices. Therefore, the standard deviation being measured does not accurately depict the variance from the average, but rather simply the variance in closing prices. The Modified Bollinger Band addresses this issue by calculating the standard deviation based on variance from the average, as opposed to variance in closing prices.
Additional Features
Optional Zig Zag Plot
Typically, the Zig Zag indicator calculates based on a user defined retracement (points or percent). The Modified Bollinger Band indicator allows users to display Zig Zag lines based on a retracement to a certain standard deviation (or Bollinger Band).

-
Optional Andrew's Pitchfork Plot
The Modified Bollinger Band indicator allows users to display Andrew's Pitchfork lines based on a the Zig Zag points shown above.

-
Optional Fibonacci Circle Plot
The Modified Bollinger Band indicator allows users to display Fibonacci Circles based on a the Zig Zag points shown above.

-
Optional Fibonacci Extensions Plot
The Modified Bollinger Band indicator allows users to display Fibonacci Extensions based on a the Zig Zag points shown above.

-
Optional Fibonacci Retracements Plot
The Modified Bollinger Band indicator allows users to display Fibonacci Retracements based on a the Zig Zag points shown above.

-
Optional Fibonacci Time Extensions Plot
The Modified Bollinger Band indicator allows users to display Fibonacci Time Extensions based on a the Zig Zag points shown above.







