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
Reddington Hi Vonasi! Really nice work, is it possible to re-create this to work in 10.3? Best regards ...
Vonasi Thanks for the compliments. No this is not easily possible in v10.3 because it uses arrays w...
bruces Hi and thank you. I successfully imported original version above and added to my Prorealtim...
frenqle Hi There.. It seems the TSL stop loss is not working.. it does not respond is that correct?
Ciccarelli Franco Per lasciare che la strategia venga eseguita (dopo aver importato il file): Basta eliminare...
JADINVEST Hello Jan, hello everyone, Thanks Jan for this strategy! Since 2020, have any of you found a...
FXmike hey my friends, thank you for this great code. my problem is he make no trade open. backtest...
FXmike Can i put a Action that my start contract is smaller than 1 ? 0.3 or 0.5 ? In wich Position...
phoentzs I wrote the code for M15 back then and also variants in H1 and M1. Everything works so far....
Alps007 Hi Nicolas. Happy New Year. Can you please program me several MACD divergence screeners ...
Arlei Zanin Hello Nicolas, would it be possible to convert the Cloud to Pascal language? Thank you.
ashee i want it in MT4
Marie-Eve Vergoz Bonsoir - Voici l'erreur qui est signalée lorsque je souhaite utiliser cet indicateur : il...
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.
Nicolas
5 years ago
LRMA
LRMA
0
Indicators
Bard Very interesting approach Vonasi! I'm getting a 404 error when trying to download though?
Vonasi I just tested and I was able to download with no error.
Psari Hi Vonasi, I am a newbie and was wondering whether you could possibly help me with this pro...
manchokcity can we have it in mql4 platform? or how or which platform do we use it?
camporan I don't use MetaTrader so I won't be able to do the translation myself. Sorry!
Alexander9 This can for amibroker ? . Thanks
Alberto Aguilera Hi! Thanks for your strategy Anyone can check it with 200 bars?
TempusFugit Hi, this simple system for DOW and only shorts has worked quite well, maybe because of its q...
phoentzs Unfortunately, I never pursued this strategy further. Maybe I should take a look with what ...
robertogozzi It surely CHANGES even when currently outside time range, as the lookback periods change as ...
SkippyTrader Thanks Roberto, but shouldnt the values in the outside time range not be different? As it sh...
robertogozzi Actually it is a constant (I tested them on a 1-hour TF, 9am to 5pm) and outside that time r...
funkystuff Salut Balmora, Ton indicateur est plutôt intéressant :) Penses-tu qu'il soit possible de l'...
brian gilbert Hello, can you explain to me what are "pipsize" and "ATAN"? What functions do they have and ...
Bodaris Bonjour, Je suis débutant 1 mois :p pipsize ressemble à la fonction pointsize et ATAN...
darbes Hi How does it go on live ? JC
antonio73 Balmora74, io vedo che funziona anche su timeframe ad 1 minuto con piccole ottimizzazioni, t...
Juananantoniorodriguez hola buenas, a este sistema automático, Cómo se le podría poner un stoploss de beneficio sim...
Nicolas change the lastline with: RETURN lastsig and check if lastsig change its value with the a...
nectouxg Hello Nicolas, I will try tonight when I get home, just one last question, I trade the DA...
FXtonio Bonjour, j'ai un problème avec le code, il me dit que ce n'est pas correct ligne 26-27-28: ...
abhay I am getting a shading between the lines, how can I avoid that. I just want to see lines as ...
Vonasi Delete the 'Color Zone' in the indicator settings window.
mscharstrom Hi @robertogozzi, I really love this indicator. However, I'd like to tinker with it to fit ...
Ahimsa Hi Roberto I cannot thank you enough for writing this code. It could help me more than you ...
Nicolas With PRT v11, you have to click on "price" at the upper left side of the price chart.
Leo I don't know, I just copy paste the strategy. The optimisation of the values I wrote them in...
bertrandpinoy hello Leo I'm spending time on your strategy code. do you agree to try to include this code ...
bertrandpinoy //version a: ajout filtre MM defparam cumulateorders=false // --- paramètres taille =...
capgros Bonjour @Nicolas, Thanks a lot for this tool, it is very useful for me. I would like to s...
Hans63 Would you add the possibility to color also the Heikin Ashi and bar chart?
Nicolas That's possible, please open a new topic in the indicator forum explaining what you need exa...
DimKar Dear sir , thank you very much for sharing !!!! it is awesome ...!!! Please can you tell me...
Nicolas Change line 62 with: drawcandle(flup,fldn,flup,fldn) coloured(169,169,169,80) bordercolor(16...
DimKar Thank you very much from Greece sir , have a nice day ....!!!! Really i do not have words...
ottimo Thank you Nicolas, great indicator, N. 1
tikigai Merci Nicolas! First Happy new Year 2020. Very good indicator BUT (yes the french "oui, m...
Nicolas Whats prorealtime version? Did you try in version prior to v11? indicator's call and loop ca...

Top