What exactly you wish to draw? You can always plot PDI/MDI with simple plot function as below.
pPDI = PDI(14);
Plot(pPDI,"PDI",colorDarkBlue,styleDashed);
Mr. myamit hull moving average for the function was organized version of AmiBroker 5.40 version
http://www.amibroker.com/guide/whatsnew.html HMA(Array,Range); For example HMA(C,5);
described. Here is your codes as you want it. Manuel optimization can play with the Parameters tab of the Range variable.
Range=Param("Range",1,1,50,1);
pPDI = PDI(Range);
HMA_PDI=HMA(pPDI,Range);
Plot(HMA_PDI,"PDI",colorRed,styleThick|styleLine);
for exmple to
http://www.ortaklar.de/showthread.php?t=4991
Plot( C, "Close",colorBlue , styleCandle | styleThick);
Length=Param( "Length ",1,1, 500,1);
LenghthB=Param( "LengthB ",1,1, 500,1);
HM=HMA(C,Length);
Plot(HM,"Amibreoker 5.40 HMA(C,50) 50 gnlk HullMoving Average fonksiyonu",colorRed,styleLine|styleThick|styleDots);
_SECTION_BEGIN("BOLLINGER");
DisplayBBColor= ParamToggle("Display BB Color","No,Yes",1);
BollPeriods =LenghthB;
//Param("Periode", 20, 0, 200, 1);
Width = Param("Std. Dev.", 2, 0, 10, 0.05 );
ColorBB=ParamColor("BB color",ColorRGB(64,0,0));
TOP=BBandTop( C, BollPeriods, Width );
BOTTOM=BBandBot( C, BollPeriods, Width );
ORT=(TOP+BOTTOM)/2;
Plot(C,"",colorWhite,styleCandle|styleThick);
Plot(IIf(TOP,Null,BBandTop( C, BollPeriods, Width )),"BBTop" + _PARAM_VALUES(), ParamColor("Color", colorDarkGreen ), styleThick+styleNoLabel);
Plot(IIf(BOTTOM,Null,BBandBot( C, BollPeriods, Width )),"BBBot" + _PARAM_VALUES(), ParamColor("Color", colorDarkRed ), styleThick+styleNoLabel);
Plot(ORT,"",colorLime, styleThick+styleDots);
example 3
PDI & MDI HMA modification and exploration
Range=Param("Range",1,1,50,1);
mMDI=MDI(Range);
pPDI = PDI(Range);
HMA_PDI=HMA(pPDI,Range);
HMA_MDI=HMA(mMDI,Range);
Plot(HMA_PDI,"PDI",colorGreen,styleThick|styleLine);
Plot(HMA_MDI,"MDI",colorRed,styleThick|styleLine);
Buy=Cross(HMA_PDI,HMA_MDI);
Sell=Cross(HMA_MDI,HMA_PDI);