HULL Moving Average for PDI & MDI

rkkarnani

Well-Known Member
#3
I do not use Amibroker, not versed with creating AFL's!! But at one time had downloaded a trial of Amibroker so have a few AFL's . Found this in my archieves :
Something to do with Hull... dont know if this is what you want!!
Period = Param("Period:", 20, 1, 200);
SqrtPeriod = Param("Square Root of Period:", 4, 1, 20);

HullMA = WMA(2 * WMA(C, Period / 2) - WMA(C, Period), SqrtPeriod);
Plot(HullMa, _DEFAULT_NAME(), ParamColor("Hull Moving Average Color", colorBlue));
 
#4
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);


 
 
Last edited:
#6
Hi elliot

Can you help for the provide me the ALF for the following Indicator


Sine-Wave Weighted Moving Average

PI:=3.1415926;
SD:=180/6;
S1:=Sin(1*180/6)*C;
S2:=Sin(2*180/6)*Ref(C,-1);
S3:=Sin(3*180/6)*Ref(C,-2);
S4:=Sin(4*180/6)*Ref(C,-3);
S5:=Sin(5*180/6)*Ref(C,-4);
Num:=S1+S2+S3+S4+S5;
Den:=Sin(SD)+Sin(2*SD)+Sin(3*SD)+Sin(4*SD)+Sin(5*SD);
Num/Den


Many Thanks in advance

Paciffic
 

Similar threads