John Ehlers Optimal Tracking Filter

John Ehlers Optimal Tracking Filter

Dr. R.E. Kalman introduced his concept of optimum estimation in 1960. Since that time, his technique has proven to be a powerful and practical tool. The approach is particularly well suited for optimizing the performance of modern terrestrial and space navigation systems. Many traders not directly involved in system analysis have heard about Kalman filtering and have expressed an interest in learning more about it for market applications. Although attempts have been made to provide simple, intuitive explanations, none has been completely successful. Almost without exception, descriptions have become mired in the jargon and state-space notation of the “cult”.

            Surprisingly, in spite of the obscure-looking mathematics (the most impenetrable of which can be found in Dr. Kalman’s original paper), Kalman filtering is a fairly direct and simple concept. In the spirit of being pragmatic, we will not deal with the full-blown matrix equations in this description and we will be less than rigorous in the application to trading. Rigorous application requires knowledge of the probability distributions of the statistics. Nonetheless we end with practically useful results. We will depart from the classical approach by working backwards from Exponential Moving Averages. In this process, we introduce a way to create a nearly zero lag moving average. From there, we will use the concept of a Tracking Index that optimizes the filter tracking for the given uncertainty in price movement and the uncertainty in our ability to measure it.  

(text and code adapted from jamesgoulding.com website).

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. supertiti • 12/24/2015 #

    Bonjour à tous,
    Pour ceux qui veulent adoucir ce filtre on peut lui adjoindre une moyenne mobile
    // Filtre Optimal track J Ehlers
    // John Ehlers Optimal Tracking Filter

    Price = (High+Low)/2
    if(barindex>5) then
    Value1 = .2*(Price - Price[1]) + .8*Value1[1]
    Value2 = .1*(High - Low) + .8*Value2[1]
    if (Value2 <>0) then
    lambda = Abs(Value1 / Value2)
    endif
    alpha = ( -lambda*lambda + SQRT(lambda*lambda*lambda*lambda + 16*lambda*lambda)) /8
    Value3 = alpha*Price + (1-alpha)*Value3[1]

    endif
    cc = customclose

    ma = average [p,m](value3)

    RETURN cc as \" cc \" , Value3 as \"Tracking filter\" , ma as \" ma \"

    // Variables :
    // p = 8 periode
    // m = ma type = triangulaire

     

    • Bern • 12/24/2015 #

      latest version pro real time not accepting code, same with Ehler’s MAMA indicator.
      any idea why?

  2. Matriciel • 12/24/2015 #

    Bonjour Nicolas,
    Merci encore pour ton travail.
    Comment peut-on faire pour avoir cette “Moyenne Mobile” d’une autre période ?
    Par exemple ; je suis sur un graphique 5 minutes et je voudrais avoir cette “Moyenne Mobile” du graphique d’une heure.
    Bien à toi.

  3. robertogozzi • 12/24/2015 #

    Vous ne pouvez pas, car ProBuilder ne prend actuellement pas en charge MTF (Multiple Time Frames).
    Selon les rumeurs, PRT y travaille et il devrait être disponible en 2020, espérons-le.

  4. jeanguy • 12/24/2015 #

    Merci pour ce travail
    En quoi cette MM est elle différente d’une MM courte ?

avatar
Register or

Likes

avatar avatar avatar avatar avatar
Related users ' posts
Etienne Hi, I'm quite late in this thread. I'd just like to propose an enhancement because this in...
Nicolas Thanks Etienne.
Bard Hi Nicolas, I wanted to make this scaled indicator above between -1 and +1 instead of 0 to +...
Nicolas
9 years ago

Top