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 Yes, that's how it goes when using loops..
JosephFelix Hi, Could I please have help with adding these indicators 'on price'? Every indicator that I...
Nicolas Just add it on price by clicking the wrench on the left upper side of the price chart.
Nicolas Apply it on the price chart. The indicator plot just one single line. There are two in the...
jamesoc Hi Nicolas, do you happen to know if there is an indicator that can be applied to charts, to...
gustavobp Buenos dias Nicolas, al agregar tu indicador no me reconoce la variable Price ni en la linea...
Bhanu Pratap Dear Sir, Can I get MQL4 File for this indicator and last man standing . pls looking forward...
ISTJ_T Hi Nicolas Thanks a lot for the indicator. Trading off the TradingView and have issues wit...
Nicolas Just use ProRealTime and its powerful screener for stocks.
tradingpro salve io faccio spread trading e volevo sapere come impostare un profitto da chiudere in a...
Nicolas Per favore non fare domande generali, non correlate al post. Usa invece il forum.
Bard Incredible, that is the clearest depiction of the trend I've ever seen Nicolas. (I just chan...
Appsoluxions Hi Nicolas, do you have the MT4 version of the indicator? I am not sure if these kind of que...
Nicolas Hi, don't have one sorry. But you can still ask for private coding through our programming s...
Appsoluxions Cool. Thanks for the response.
rama I want to use this indicator in trading system, it says zig zag is obsolete and not supported
Nicolas Right, due to its repainting behavior, the zigzag is not allowed in automated trading with r...
rama I noticed it changes as time progress, I am 7 as the average, how many period it wont chang...
Gordon101 Hi when I added your Guppy indicator to my chart it went below the chart beside the oscilla...
Nicolas Add it on the price by using the wrench located on the left upper side of your price chart.
Gordon101 Thanks Nicolas, worked a treat.
Simba Greetings from germany! :) Can you told me your EXIT-strategy for this, please? :) Would ...
Rafa And the PriceMAPeriod? aren´t the same?
Nicolas The PriceMAPeriod is the period to make the average of all the last X medianprice found.
Rafa Thanks a lot Nicolás. Have a nice day
ak5hay2 Works like crazy on bitcoin. Use different timeframes. Thanks a lot Doc!!!
richyowen Hi, great code thanks. Very new to this forum. Is there a way to add a 100point target on an...
lisamitch50 Morning all, Just backtested on quite a few instruments, worked well on backtesting, but tel...
Nicolas
6 years ago
Nicolas Merci, faire une demande dans le forum approprié.
Pere Thanks for this good indicator Nicolas. I would like to make the upper and lower limits mor...
Nicolas because fractals are known 2 bars later! that's why I used rectangle to plot them in the past.
swapping merci gabri, on va le mettre à l'essai ;)
Leo Hi all, I posted a new version of this indicator ( I just add arrows to spot the local maxi...
Trading_En_El_Ibex35 Muchas Gracias por compartir este interesante indicador. Un saludo
xavieralava hola gracias leo
gblast I added this indicator to my pro real time but its not showing up on my candles. Its invisible
Khaled Thanks, but if I may ask what's EMA Period? The price which reverses the EMA[20] is not the ...
Francesco78 EMA is not a moving average, it is just the name we called the quantity defined above
Khaled My bad. Thank you so much!
juanj And the point of violation is the close of the candle that violates the line by generating a...
juanj For the latest version of the strategy or to follow updates and developments see the thread ...
phanz i backtested it with 10K units of EURUSD 1 hour i get an equity curve that is going one way ...

Top