Laguerre Filter

The Laguerre Filter (LF) was authored by John Ehlers. The LF requires the current price, three prior prices, a user defined factor called alpha and a good deal of feedback to fill its calculation. The user may change the input (midpoint) and the alpha factor. This indicator’s definition is further expressed in the condensed code given in the calculation below.

See also article by John Ehlers

Laguerre Filter


//input = price, user defined, default is midpoint
//alpha = user defined factor, default is 0.2
//prev = previous, index = current bar number

priorP1 = price[index-1];
priorP2 = price[index-2];
priorP3 = price[index-3];
prevL0 = ifNull(price, lo[index-1]);  //feedback ingredent
prevL1 = ifNull(price, l1[index-1]);  //feedback ingredent
prevL2 = ifNull(price, l2[index-1]);  //feedback ingredent
prevL3 = ifNull(price, l3[index-1]);  //feedback ingredent
l0 = alpha*price + (1-alpha)*prevL0;
l1 = -(1 - alpha)*l0 + prevL0 + (1 - alpha)*prevL1;
l2 = -(1 - alpha)*l1 + prevL1 + (1 - alpha)*prevL2;
l3 = -(1 - alpha)*l2 + prevL2 + (1 - alpha)*prevL3;
Plot1: filt = (l0 + 2*l1 + 2*l2 + l3) / 6;
Plot2: fir = (price + 2*priorP1 + 2*priorP2 + priorP3) / 6;

How To Trade Using the Laguerre Filter

The Laguerre Filter is a trend indicator and may be used in conjunction with other studies. No trading signals are calculated.

How To Access in MotiveWave

Go to the top menu, choose Study>John Ehlers>Laguerre Filter

or go to the top menu, choose Add Study, start typing in this study name until you see it appear in the list, click on the study name, click OK.

Important Disclaimer: The information provided on this page is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security. Please see our Risk Disclosure and Performance Disclaimer Statement.