Ehler’s Fractal Adaptive Moving Average (FRAMA)

Ehler’s Fractal Adaptive Moving Average (FRAMA)

The Fractal Adaptive Moving Average FRAMA was developed by John Ehlers.

The indicator is constructed on the EMA exponential moving average algorithm, with a smoothing factor calculated on the basis of the current fractal dimension of the price.

The advantage of the indicator is the ability to track strong trend movements and market consolidation moments.

Interpretation Trading Signals And Rules:
The interpretation of the indicator is identical to the interpretation of moving averages
_ The FRAMA line is relatively “flat” in periods of horizontal range trading. It could therefore be used to avoid many false signals when it is desired to use a technique of the crossing of moving averages.
_ The FRAMA line has a greater reactivity to changes in trends than moving averages, making it possible to take a much earlier position on a breakout of the horizontal channel.

 

 

original code from gigi @ http://www.aktienboard.com/forum/f29/prorealtime-cmc-script-programmierung-t94783/215#post2035965

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. century • 11/24/2016 #

    hi
    i will use it to see … and get back to tell ya

  2. luigi • 11/24/2016 #

    Ciao Nicolas. Approfitto di questo spazio per chiederti se puoi aiutarmi. Avrei bisogno di un codice che sommi in tempo reale sul grafico tick by tick tutti i volumi in intraday che vengono scambiati su ogni livello di prezzo e che venga plottato sul grafico il livello dove in quel momento si stanno scambiando più contratti. Allego un esempio dove ho messo le frecce azzurre per indicare i volumi in real time plottati sul grafic.
    Grazie.
    Luigi

    • Nicolas • 11/24/2016 #

      Si prega di utilizzare i forum per chiedere richieste di codice per favore.

  3. Wilko • 11/24/2016 #

    Hi Nicolas!,
    Thanks for providing code for the FRAMA! If I have understood correctly, one should enter both minimum MAperiod and maximum MAperiod for the adaptive process. I am uncertain if your code provides for this. If so could you tell which variables hold these values, please?
    Kind regards,
    Wilko

    • dakaodo • 11/24/2016 #

      Hi, Wilko. Acc to the original FRAMA paper by Ehlers, Ehler’s own code only takes inputs for price and N (respectively, pri and len in Nicholas’ code above). If I follow the code, then I think it adaptively generates its own min and max periods, and the N value is only intended for your desired level of smoothing, not a fixed period for calculating the MA.

  4. dakaodo • 11/24/2016 #

    For reference, here is Ehlers’ original paper:

    http://www.mesasoftware.com/papers/FRAMA.pdf

    And for anyone interested in tweaking this, ETFHQ wrote an article on adjusting the constant w, which in the code above is hardcoded as a value of -4.6. By allowing two new variables FC and SC, you can set the fast and slow averages used to calculate the FRAMA.

    http://etfhq.com/blog/2010/09/30/fractal-adaptive-moving-average-frama/#Mod

    I am only smart enough to edit in the ability to set your own slow average (variable sc), so the fc is still set to the original default of 1.

  5. dakaodo • 11/24/2016 #

    Here is the code with only SC included, per ETFHQ.

    pri=customclose
    //len>=4, even
    once len=p
    once w=2.303*log(2/(sc+1))
    //once w=-4.61015 equivalent to sc=200

    N3=(Highest[len](High)-Lowest[len](Low))/len

    mH=High
    L=Low

    For count=0 To len/2-1
    If High[count] > mH Then
    mH=High[count]
    Endif

    If Low[count] HH Then
    HH=High[count]
    Endif

    If Low[count] 0 And N2 > 0 And N3 > 0 Then
    Dimen=(Log(N1+N2)-Log(N3))/Log(2)
    Endif

    alpha=Exp(w*(Dimen-1))

    If alpha 1 Then
    alpha=1
    Endif

    Filt=alpha*pri+(1-alpha)*Filt[1]

    If Barindex < len+1 Then
    Filt=pri
    Endif

    Return Filt as "FRAMA"

avatar
Register or

Likes

avatar avatar avatar
Related users ' posts
Nicolas En effet, c'est le cas si on copie/colle le code. Ces 2 variables sont inscrites en externes...
Salocin Hello Nicolas, my french is not that well. It occurs an error which can not be solved by cop...
Nicolas Just download the ITF file and import it into your platform, follow these easy steps: https:...
Nicolas
8 years ago
Holt EMA
Holt EMA
1
Indicators
robertanthonyuk Hi,What do the each colour represent? Rob
Nicolas You'll need to preload bars to get the good calculations of you indicators. I did not test i...
David Nicolas I tried DEFPARAM Preloadbars = 5000 And still the same drawn output of entries/exit...
marcara Hi, Thank you very much for the Moving Average Daily indicator, I am using it as indicator i...
Nicolas Je l'ai converti depuis un code pinescript. De mémoire il s'agit bien d'une variation d'une ...
Captain_Walker @Nicolas, I've copied your code into PRT indicator panel to create it. When I attempt to sav...
Nicolas Download the itf file and import it.
Nicolas Please post any question on forums, thanks.
Lavallette Bonjour Nicolas. J'utilise la version 11 et moi aussi j'ai une ligne horizontale malgré l'a...
Nicolas il faut modifier la ligne 20 avec: if adaptive=1 and averagePeriod > 1 and barindex>(...
Nicolas
8 years ago
haseluis Hello Niklas, I would like to use the screener for the display in the m15, which changes to ...
Nicolas Nothing to change or you can play with different settings at lines 6 and 7.
haseluis Thank you Niklas, I'm still looking for an indicator 123 or direct to Joe Ross, can you help...
Nicolas The code is correct, don't know if the label and color are the same as other trading softwar...
peppe novellino Hi Nicolas, the settings of the alligators are not editable. How can I change it? Thanks in ...
pabo_swe I got very bad performance with this script, it was slow... it seems like if one breaks out ...
bluetime6 Hello Doctrading.   Can you ask you for something? Can you code a screener screen po...
gianlox I added a simple momentum indicator (MACD). I think much better results:   achat = 0v...
gianlox achat = 0 vente = 0 MACD12M = MACDline[12,26,9](close) MACD12S = ExponentialAverage[9](MA...
Nicolas Thank you for contribution. Please consider that advertising is tolerate as long as you cont...
triss1965@gmail.com  Hi, I cant make it work. And if you doing so much money. Why do you have to sell it? It don...
T-rader Eva... He dosen´t sell anything. He is just a nice guy that want to share on of his strategy...
Nicolas
8 years ago
Nicolas add it on price chart, change the cp parameter according to the period you want to observe f...
Robert22 hola buenos días: yo estoy buscando una cosa parecida para realizar con ello un indicador de...
Nicolas https://www.prorealcode.com/prorealtime-indicators/rsi-classical-hidden-divergences-indicator/
Fabio Anthony Terrenzio this strategy works only in a well defined trend
brosly Good afternoon I am trying to get the complete code of lex strategy made by adolfo since I s...
dreif123 hi Adolfo, is Alex Auto Trading Botindex working on DAX as well ? if so , can you post the...
phili711 Bonjour Si la moyenne 100 est au dessus de la moyenne 20 le trend est baissier zlors pourqu...
Nicolas La comparaison se fait entre la valeur de la moyenne actuelle et telle qu'elle était il y a ...
Thomas007 we should definitely open a new thread for intraday trading - can we post the link once it's...
Denis Bonjour Nicolas, j'ai une question à propos de ce code, il faut que je la pose en anglais ca...
Nicolas En français pas de problème
Blue Sky A great job Nicolas, thanks. A question about averages, what period is the fast average and ...
Lotech123 This Indicator is very useful if the Risk number is altered to suit the time frame, volume o...
Bern error displaying, code must end with RETURN. Any idea hot to fix it?
Yantra "i believe this indicator could help any trend followers in trading decision. " I'm wonderin...

Top