Ehlers DSMA

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #75611 quote
    Despair
    Blocked
    Master

    This is the latest John Ehlers indicator featured in the July 2018 edition of Traders’ Tip.

    In “The Deviation-Scaled Moving Average” in this issue, author John Ehlers introduces a new adaptive moving average that has the ability to rapidly adapt to volatility in price movement. The author explains that due to its design, it has minimal lag yet is able to provide considerable smoothing.

    //Smooth with a Super Smoother
    if barindex>Period then
    a1 = Exp( -1.414 * 3.14159 / ( .5 * Period ) )
    b1 = 2 * a1 * Cos( 1.414 * 180 / ( .5 * Period ) )
    c2 = b1
    c3 = -square(a1)
    c1 = 1 - c2 - c3
    //Produce Nominal zero mean with zeros in the transfer
    //response at DC and Nyquist with no spectral distortion
    //Nominally whitens the spectrum because of 6 dB
    //per octave rolloff
    Zeros = Close - Close[2]
    
    //SuperSmoother Filter
    Filt = c1 * ( Zeros + Zeros[1] ) / 2 + c2 * Filt[1] + c3 * Filt[2]
    
    //Compute Standard Deviation
    RMS = 0
    For count = 0 to Period - 1
    RMS = RMS + square(Filt[count])
    Next
    RMS = Sqrt( RMS / Period )
    
    //Rescale Filt in terms of Standard Deviations
    If RMS <> 0 then
    ScaledFilt = Filt / RMS
    else
    ScaledFilt = 0
    endif
    alpha1 = Abs( ScaledFilt ) * 5 / Period
    DSMA = alpha1 * Close + ( 1 - alpha1 ) * DSMA[1]
    endif
    return DSMA as "EhlersDSMA"
    
    #75654 quote
    Nicolas
    Keymaster
    Master

    Thank you, but I moved your code submission to forum, because the DSMA has already been published: Deviation-Scaled Moving Average DSMA

    Now we have 2 versions 🙂

    #75684 quote
    Despair
    Blocked
    Master

    I saw your version after I already submitted mine. Sorry for this double submission. 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Ehlers DSMA


ProBuilder Support

New Reply
Author
author-avatar
Despair @despair Blocked
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Despair
7 years, 6 months ago.

Topic Details
Forum: ProBuilder Support
Language: German
Started: 07/09/2018
Status: Active
Attachments: 1 files
Logo Logo
Loading...