Skip to main content

Modified bollinger Bands for Amibroker (AFL)

extremist over 13 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 1)
  • Tags:
    amibroker, bands

this no great code but this could be helpful in achieving the following goal of using bollinger band squeeze indicator effectively for ur help check out the video:

http://www.youtube.com/watch?v=MHrYCD-Kzqg

Indicator / Formula

Copy & Paste Friendly
P = ParamField("Price");
Type = ParamList("Type", "Simple,Exponential,Double Exponential,Tripple Exponential,Wilders,Weighted,Len Reg,Time Shift,AMA,Median");


Periods = Param( "period ", 15, 1, 500, 1 );
Width = Param("Width", 1.6185, 0, 10, 0.0001 );
s = Param("shift", 0, -10, 10, 1 );

Var   = Param("AMA var", 0.03, 0, 10, 0.001 );

m = 0;

if( Type == "Simple" ) 					m = MA( P, Periods );
if( Type == "Exponential" ) 			m = EMA( P, Periods );
if( Type == "Double Exponential" ) 	m = DEMA( P, Periods );
if( Type == "Tripple Exponential" ) 	m = TEMA( P, Periods );
if( Type == "Wilders" ) 				m = Wilders( P, Periods );
if( Type == "Weighted" ) 				m = WMA( P, Periods );
if( Type == "Len Reg" ) 				m = LinearReg( P, Periods );
if( Type == "Time Shift" ) 				m = TSF( P, Periods );
if( Type == "AMA" ) 						m = AMA( P, Var );
if( Type == "Median" ) 					m = Median(P,Periods );

bbtop= m + Width * StDev(P,Periods );
bbbot= m - Width * StDev(P,Periods );

Color = ParamColor("Color", colorYellow );
Style = ParamStyle("Style",styleDashed);


Plot( bbtop, "\nBBTop("+Type+" , "+Periods +" , "+Width +")", Color, Style ,0,0,s); 
Plot( bbbot, "\nBBBot("+Type+" , "+Periods +" , "+Width +")", Color, Style ,0,0,s); 

3 comments

over 13 years ago

TTM Squeeze Clone afl. is the best Bollonger Bands squeeze ever.

over 13 years ago

i didn’t challenged any code here.
i posted it to see directly what those codes bb squeeze and ttm squeeze actually do by applying the above bb to price,

anyways….

over 13 years ago

extremist- OK, then anyone interested should get TTM Squeeze Clone Indicator which was posted somewhere on this site after seeing the above video. There are many TTM Squeeze Indicator strategies on youtube. This is really an excellent Indicator. It is actually John Carter’s Indicator.
http://www.youtube.com/watch?v=BUf5xd2-2C0
http://www.youtube.com/watch?v=JVeBrkHdSY4
http://www.youtube.com/watch?v=dKPaUjbjolw
http://www.youtube.com/watch?v=MWLAazopu3s

Leave Comment

Please login here to leave a comment.