Sharing investing and trading ideas. Helping traders get started.
Advertisement

Saturday, June 20, 2009

Bollinger Band

Bollinger Band BB
Comes with formula, calculation steps and VBA code

The Bollinger band plots three lines on the chart.

Upper Bollinger Band = Simple Moving Average over last n days + k x Standard Deviation of Price over last n days.

Middle Bollinger Band= Simple Moving Average over last n days

Lower Bollinger Band = Simple Moving Average over last n days - k x Standard Deviation of Price over last n days.

, where k and n are specified by the user. The Bollinger band attempts to measure the extent to which a stock is excessively bought or sold.

VBA Code
Sub Runthis()
Dim close1 As Range, output As Range, n As Long
Dim band_factor As Double

Set close1 = Range("E2:E11955")
Set output = Range("H2:H11955")

n = 5 'number of historical periods to look at
'needed for certain indicators
band_factor = 1.5 'For adaptive price zone

BB_1 close1, output, n, band_factor
End Sub

Other References




Like what you have just read? Digg it or Tip'd it.
The objective of Finance4Traders is to help traders get started by bringing them unbiased research and ideas. Since late 2005, I have been developing trading strategies on a personal basis. Not all of these models are suitable for me, but other investors or traders might find them useful. After all, people have different investment/trading goals and habits. Thus, Finance4Traders becomes a convenient platform to disseminate my work...(Read more about Finance4Traders)

1 comments:

Anonymous said...

Can you post the contents of the BB_1 Sub routine? That would be most helpful.

Post a Comment