Bollinger Band Targets

How do you know when a trend has started? Ended? This forum is for discussions about trend indicators and signals.
Post Reply
Chris67
Roundtable Knight
Roundtable Knight
Posts: 1052
Joined: Tue Dec 16, 2003 2:12 pm
Location: London

Bollinger Band Targets

Post 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
WiseOwl
Full Member
Full Member
Posts: 12
Joined: Thu Jun 10, 2004 1:41 am
Location: France

Bolly Band VBA code required

Post by WiseOwl »

Dear All,

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

Thanks in advance

WiseOwl
sagev
Senior Member
Senior Member
Posts: 31
Joined: Thu Mar 25, 2004 12:49 pm

Post 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
WiseOwl
Full Member
Full Member
Posts: 12
Joined: Thu Jun 10, 2004 1:41 am
Location: France

Post 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
BBands
Contributor
Contributor
Posts: 1
Joined: Fri May 02, 2008 9:51 am
Contact:

Post 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/
Post Reply