Back to TS code links
  Leading indicator from John Ehlers
Back to Ehlers links


Anyone using information or codes on these pages does so at their own risk - no guarantees of stability or profitability are claimed. These codes are all for testing purposes only.

{Ehlers Leading indicator - coded by dn -from Cybernetic Analysis for Stocks and Futures}
{Apply to the price region of the chart}

Input: Price((H+L)/2), alpha1(.25), alpha2(.33);
Var: Lead(0), NetLead(0), EMA(0);
Lead = 2*Price + (alpha1-2)*Price[1]+(1-alpha1)*Lead[1];
NetLead=alpha2*Lead+(1-alpha2)*NetLead[1];
EMA=.5*Price+.5*EMA[1];
Plot1(NetLead,"Lead",blue);
Plot2(EMA,"EMA");
////This Leading Indicators is smoothed by an EMA to mitigate normal noice gain
////Constants can be adjusted to provide a net lead at low frequencies.