Similar indicators already published have modifications with respect to Elder's theory. This indicator fulfills literally what is described in the New Trading For A Living.
Lines "Total Up Impulses" and "Total Down Impulses" are the sum of impulses in the last n periods (Length). line 1 => "Total Up Impulses": the sum of up impulses. line 2 => "Total Down Impulses": the sum of down impulses. When line 1 crosses up line 2, it indicates an uptrend is comming out. When line 1 crosses down line 2, it indicates a downtrend is comming out.
Infinite Impulse Response (IIR) Filter indicator script. This indicator was originally developed by John Ehlers (Stocks & Commodities V. 20:7 (26-31): Zero-Lag Data Smoothers).
EXPERIMENTAL: Counts the number of impulses with the same direction within a larger trend.