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 • 241 days ago #

      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
jacquesgermain Bonjour non pas de soucis car src=customclose donc dans le menu configuration/propriété me...
geroniman Merci Jacques , indic tres utile. J'ai un indic à programmer avec du price action. es tu dis...
jacquesgermain ok pour regarder ...
finplus Bonjour, une petite demande concernant cet indicateur : comment faire pour que lorsque la bo...
LucasBest Bonjour, la coloration des bandes se fait ligne 111 et 112 à l'aide des instructions colorbe...
GustavoLoboOrenstein Is it possible to add histogram with only increasing bars?
Nicolas Je ne rencontre pas ce problème avec le NASDAQ par exemple, ce serait plus simple d'ouvrir u...
YvesRobert Bonjour Nicolas, en effet ca marche, je me suis trompé, j'ai bien tout le tracé. C'est parce...
oliTR Bonjour, les conditions longCond et shortCond ne contiennent-elles pas une condition qui s'a...
snucke i dont think you understod the question. i did not ask about the band pass indicator. i as...
thomas2004ch Hi, Is this startegy suitable for daily SPY? Regards
ebous64 Je cherche à traiter des effets de bords avec un encadrement ajustable des variables. Vous a...
Jiacky
2 years ago
Kalman Filter
Kalman Filter
0
Indicators
Sever
2 years ago
Bruno Carnazzi Il me semble que la fonction "floor" n'est disponible qu'avec PRT11, à vérifier
DELBERT Bonjour , merci pour votre réponse , je m'excuse je suis avec PRT v10.3 donc c'est indicateu...
Nicolas c'est juste, c'est une instruction très récente.
zilliq Thanks @Nicolas. I tried to use it as Trend in a proorder system, but don't know why, it doe...
Suzu Yuk He is right. MT and mavgMT are not defined and causing errors.....
RubberToe Is there something we are missing here, I just get the same curved line as well...
Khaled @Nicolas, Hi Nicolas, I've downloaded the itf and it doesn't display as an Oscillator, it"s ...
sal157011 I think the problem here is that you must feed the trigonometric functions cos and sin with ...
Nicolas
4 years ago
Nicolas La définition des couleurs se situent entre les lignes 94 et 118. Selon le type de bougie (h...
Manu35250 Bonjour Nicolas, Est il possible de convertir cet indicateur en screener ? J'essaie depui...
Nicolas Bien sûr, merci de formuler la demande dans le forum approprié en respectant les règles de p...
Nicolas c'est exactement ce que je fais entre les lignes 58 et 64 pour pouvoir tracer la ligne complète
Italo Fabian Nicolas, Ces matrices sont-elles des vecteurs unidimensionnels ou multidimensionnels? Depu...
Denis Bonjour Nicolas et RicLg, Merci Nicolas pour cet indicateur intéressant et merci RicLg pour...
ggolfet Hi Actarus, what's the name of the histogram indicator below Apple's chart?
Actaru5 Flag ShowState in setting and show histogram
NicolaSilvagni hi, thank you for creating this indicator. i can't figure out how to get the three graphs b...
Nicolas Check your custom trading hours and use the default market ones.
fj_pastor Hello Nicolas, Thanks again for all your support. Finally I debugged the problem. The sim...
kallistos Hi Nicolas, Thank you very much indeed for this indicator (and all the others you are provi...
Morrissey38 Muchísimas gracias Nicolás , muy amable.
Bruno Carnazzi extrèmement pertinent
Bruno Carnazzi Is that beatable ?
Sapo Thank you for your indicators. As always it's perfect, I thank you for your help it's preci...
Vonasi Sure that is possible. I will code it and make a post in the English ProBuilder forum and pu...
Vonasi Vama v2 with Hull moving average included can be found here: https://www.prorealcode.com/top...
JMat45 Thank you, Vonasi.

Top