Skip to main content

Ehlers Filter for Amibroker (AFL)

matrix2010 over 15 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 2)
  • Tags:
    amibroker, filter, ehler

This AFL calculate Ehlers Filter.

Screenshots

Indicator / Formula

Copy & Paste Friendly
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", colorBlack, styleLine);
Plot(NLEF, "NonLinear Ehlers Filter", IIf(Close>NLEF, colorGreen, colorRed), styleLine);

0 comments

Leave Comment

Please login here to leave a comment.