Page 1 of 1

Bollinger Band Targets

Posted: Sun Feb 15, 2004 3:22 pm
by Chris67
On veritrader 1.5 we have the ability to use a counter trend system based on bolly band breaks and targets.
Since Bollinger bands are a moving target .. lets suppose we have a system that sells at 2 standard deviation above theM.A and buys back at 0.5 below. If the trade is triggered and the market moves in our favour the bolly bands move lower too ... so the question is does one place the order at the beginning of the day and take profit if that level is seen ? or wait until we see a penetration during a particular day as these 2 could be at different levels.

Thanks for any comments
Chris

Bolly Band VBA code required

Posted: Mon Oct 11, 2004 4:45 am
by WiseOwl
Dear All,

Does anyone have a link or code for calculating a Bolly Band in VBA?

Thanks in advance

WiseOwl

Posted: Sun Oct 17, 2004 6:15 pm
by sagev
don't know whether it will feed your need, but Futures Magazine offers an free spreadsheet to calculate BB, check http://www.futuresmag.com/downloads/files/bbands.zip

Posted: Sat Oct 23, 2004 8:41 am
by WiseOwl
Cheers Cnyub!

Didn't get it on Futures Mag...but here's my version

SimpleMA = CalcSimpleMA(I, BollingerRange)
OneStandardDeviation = CalcOneStandardDeviation(I, BollingerRange, SimpleMA)
CurrentBollingerLowerBand = Round(SimpleMA - (SDStop * OneStandardDeviation), 0)

Function CalcSimpleMA(I, BollingerRange)

Rem TypicalPrice = 0
WeightedPrice = 0
For n = I - (BollingerRange - 1) To I
TodaysHigh = Range(HighCol & n)
TodaysLow = Range(LowCol & n)
TodaysClose = Range(CloseCol & n)
Rem TypicalPrice = TypicalPrice + ((TodaysHigh + TodaysLow + TodaysClose) / 3)
WeightedPrice = WeightedPrice + ((TodaysHigh + TodaysLow + TodaysClose + TodaysClose) / 4)
Next

Rem SimpleMA = TypicalPrice / BollingerRange
CalcSimpleMA = WeightedPrice / BollingerRange

End Function
Function CalcOneStandardDeviation(I, BollingerRange, SimpleMA)

SumSigmaSquare = 0
For n = I - (BollingerRange - 1) To I
TodaysLow = Range(LowCol & n)
SumSigmaSquare = SumSigmaSquare + ((SimpleMA - TodaysLow) ^ 2)
Next

SigmaSquare = SumSigmaSquare / BollingerRange
CalcOneStandardDeviation = Sqr(SigmaSquare)

End Function

Posted: Fri May 02, 2008 11:25 am
by BBands
Unfortunately, the Futures magazine spreadsheet contains an error. The proper volatility function for calculating Bollinger Bands in Excel is =stdevp(), not stdev().

jab

http://www.BBands.com/