Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

FRAMA - Fractal Adaptive Moving Average for Amibroker (AFL)
walid
over 13 years ago
Amibroker (AFL)

Rating:
5 / 5 (Votes 1)
Tags:
amibroker, moving average

Another form of moving Average that used the fractal theory and ploted by Adaptive Moving Average (AMA)
enjoy it good trading

Similar Indicators / Formulas

Hull Moving Average (HMA)
Submitted by kaiji over 14 years ago
Beauty
Submitted by sbtc555 almost 11 years ago
Smoothed MA (SSMA)
Submitted by kelvinhand almost 11 years ago
Trend Scalping System
Submitted by esnataraj about 14 years ago
Buff Volume Weighted Moving Averages
Submitted by kaiji over 14 years ago
Volume wieghted moving average
Submitted by kaiji about 14 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("FRAMA");
// FRAMA - Fractal Adaptive Moving Average
Price = (H+L)/2;
N = Param( "N", 16, 2, 40, 2 ); // must be even **
N3 = ( HHV( High, N ) - LLV( Low, N ) ) / N;

HH = HHV( High, N / 2 ) ;
LL = LLV( Low, N / 2 );

N1 = ( HH - LL ) / ( N / 2 );

HH = HHV( Ref( High, - N/2 ), N/2 );
LL = LLV( Ref( Low, - N/2 ), N/ 2 );

N2 = ( HH - LL ) / ( N / 2 );

Dimen = IIf( N1 > 0 AND N2 > 0 AND N3 > 0, ( log( N1+N2) - log( N3 ) )/log( 2 ), Null );

alpha = exp( -4.6 * (Dimen -1 ) );
alpha = Min( Max( alpha, 0.01 ), 1 ); // bound to 0.01...1 range

Frama = AMA( Price, alpha );

Plot( Frama, "FRAMA("+N+")", colorRed, styleThick );
Plot( EMA( C, N ) , "EMA("+N+")", colorBlue );
Plot( C, "Close", colorBlack, styleCandle );

//-----------------------------------------------------------------------
//**Odd period inputs can be allowed with the inclusion of fol code :-

//if( (N % 2) != 0 ) //or if ( (N & 1) != 0 )N ++
_SECTION_END();

0 comments

Leave Comment

Please login here to leave a comment.

Back