.

Magic Line With Non Linear Filter - Amibroker AFL Code

Click Image To Enlarge. Please Rate And Comment.

Magic Line With Non Linear Filter

Price = (H+L)/2;
MomLength = 15;

PriceMomSum = 0;
FiveMomSum = 0;

FiveMom = abs(Price - Ref(Price, -5));
PriceMom = Price * FiveMom;
for (i=0; i < MomLength; i++) {
 PriceMomSum = PriceMomSum + Ref(PriceMom, -i);
 FiveMomSum = FiveMomSum + Ref(FiveMom, -i);
}
NLEF = PriceMomSum / FiveMomSum;

Plot(Close, "Close", colorWhite, styleLine);
Plot(NLEF, "NonLinear Ehlers Filter", IIf(Close>NLEF, colorGreen, colorRed), styleLine);
Previous Post Next Post