Pages

Friday, September 14, 2012

%b of Bollinger Bands AFL for Amibroker

 %b of Bollinger Bands AFL .

%b, tells us where we are in relation to
the Bollinger Bands and is the key to the development of trading
systems via the linking of price and indicator action.
===============================================================

P = ParamField("Price field",-1);
Periods = Param("Periods", 20, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
//Color = ParamColor("Color", colorCycle );
//Style = ParamStyle("Style");
//Plot( BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), Color, Style );
//Plot( BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), Color, Style );

BBW = BBandTop(P, Periods, Width)  -  BBandBot(P, Periods, Width);
b=  (C -  BBandBot(P, Periods, Width))  / BBW;
Plot( b,"%b",colorRed);


==================================================================

No comments:

Post a Comment