+91-0000000000

}

Monday – Friday : 9:00 AM – 6:30 PM

Displaced Moving Average

The Displaced Moving Average, implemented through Amibroker data, involves shifting a Moving Average forward or backward on a chart. Traders may use AFLs within Amibroker to apply displaced moving averages, potentially aiding in trend identification and entry/exit signals.

/
_SECTION_BEGIN("DispMA");
P = ParamField("Field");
Type = ParamList("Type", "Simple,Exponential,Double Exponential,Tripple Exponential,Wilders,Weighted");
Periods = Param("Periods", 30, 2, 100 );
Displacement = Param("Displacement", 15, -50, 50 );
m = 0;

if( Type == "Simple" ) 					m = MA( P, Periods );
if( Type == "Exponential" ) 			m = EMA( P, Periods );
if( Type == "Double Exponential" ) 	m = DEMA( P, Periods );
if( Type == "Tripple Exponential" ) 	m = TEMA( P, Periods );
if( Type == "Wilders" ) 				m = Wilders( P, Periods );
if( Type == "Weighted" ) 				m = WMA( P, Periods );

Plot( m, _DEFAULT_NAME(), ParamColor("Color", ColorCycle), styleLine, 0, 0, Displacement );
_SECTION_END();

Open chat
1
Hi, how can I help you?