P = ParamField("Price field",-1);
Periods = Param("Periods", 7, 2, 300, 1 );
Width = Param("Width", 1, 0, 10, 0.05 );
Color = ParamColor("Color", colorCycle );
Style = ParamStyle("Style");
top = BBandTop( P, Periods, Width );
bot = BBandBot( P, Periods, Width );
Plot( top, "BBTop" + _PARAM_VALUES(), Color, Style );
Plot( bot, "BBBot" + _PARAM_VALUES(), Color, Style );
Plot ( C, "", colorWhite, styleCandle );
Buy = Cross(p, bot);
Sell = Cross(p, top);
PlotShapes( shapeSmallCircle* Buy, colorLime, 0, L, -20 );// plots
small lime circle below the price bar for a buy-signal
PlotShapes( shapeSmallCircle* Sell , colorRed, 0, H, 20 );// plots
small red circle above the price bar for a sell-signal
On 12/11/2009 9:46 PM, Deepak Patade wrote:
|
|
Hi,
Can any body help me.
i want to buy when price touches Bollinger
band bottom and sell when it touches Bollinger band top.
How to write this in afl.
_SECTION_BEGIN("Bollinger
Bands");
P = ParamField("Price field",-1);
Periods = Param("Periods", 7, 2, 300,
1 );
Width = Param("Width", 1, 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 );
this is BB afl.
Do help out
Deepak Patade,
Nasik.
|
|
|
|
|
|
__._,_.___
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
__,_._,___
|