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.

 

// FRAMA

//p = 20

pri=Customclose
len=p

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] < L Then
  L=Low[count]
 Endif
Next

N1=(mH-L)/(len/2)

HH=High[len/2]
LL=Low[len/2]

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

 If Low[count] < LL Then
  LL=Low[count]
 Endif
Next

N2=(HH-LL)/(len/2)

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

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

If alpha < 0.01 Then
 alpha=0.01
Endif

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"

 

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

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?

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

  1. century • 91 days ago #

    hi

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

  2. luigi • 89 days ago #

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

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

  3. Wilko • 7 days ago #

    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

avatar
Register or

Likes

avatar avatar
Related users ' posts
Sofitech Ce code n'est valable que sur la V10.3 ? sur le 10.2 il y a une erreur de syntaxe dans le fi...
Nicolas Oui en effet, c'est un indicateur "10.3" à cause uniquement de la mise en forme des courbes ...
Nicolas
2 months ago
Holt EMA
Holt EMA
0
Indicators
David Nicolas I've looked at it again and there's a problem.  As an example here's a simple cross...
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...
supertiti Voici un code de VIDYA construit par Sohocool : // MOYENNE EXPONENTIELLE ADAPTIVE VIDYA by ...
Matriciel Merci Supertiti. Je trouve que ce code est difficile à règler et n'est pas d'une grande pré...
Ernesto1 J'ai essayé avec deux différents I ,  a =  3 périodes et un 3 x 5 = 15 périodes.Ie comme si ...
Nicolas
3 months ago
SoloContado Hello Nicolas,   thanks a lot for your many contributions in this post. I have a prob...
Nicolas Because of no data available at the start of calculations. Add this at line 15 : if barindex...
Nicolas
4 months ago
SAM Thanks!!In your opinion,  make a screener with more condition filter could be interessting? ...
Nicolas You can have already as much conditions as you want, it is only the multiple sorting criteri...
SAM Thanks for your answers!
triss1965@gmail.com HELP, WHY DONT I NOT GOT THE INDICATOR IN CHART. JUST UNDER?????????????
Nicolas Use the wrench on the upper left side of your price chart to add correctly indicator on PRICE.
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...
Somatolysis   Hi IGOSNELL, you´ll find other of my strategies here - but without the code - maybe...
IGOSNELL Thanks but unfortunately can't read German. If you can show that your strategies can work on...
Nicolas Thank you for contribution. Please consider that advertising is tolerate as long as you cont...
Nicolas
7 months ago
Petrus Hi Nicolas. Nice indicator, as always! It could be very useful to detect some waves on the ...
Nicolas Yes of course, please add a new request in the ProBuilder forum.
Petrus Thanks Nicolas. Done.
finplus Bonjour, j'ai retesté hier sur la paire AUD/USD timeframe 1 heure sur mon compte réel chez I...
finplus Bonsoir, j'ai de nouveau aujourd'hui lancé la stratégie en réel sur mon compte IG sur la pai...
AleX 0 improvments, I tried a lot of modified version but no one was working. I think that only w...
Nicolas Ok Doc, beware of intraday, it's a battlefield full of random noises :) Maybe we can work to...
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 ...
Nicolas You have certainly apply the indicator twice on the price chart. If you want to hide one of ...
fabriziomerlo Buongiorno Nicolas,  come faccio a trasformare questo interessantissimo indicatore in uno s...
Nicolas Si desidera testare una croce sopra di 2 media mobile? Si prega di fare un argomento nel for...

Top