+91-0000000000

}

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

Detrended Price Oscillator

This tool focuses on removing the overall trend from price data. In the context of the best AFL code for Amibroker, the Detrended Price Oscillator helps traders concentrate on short-term price movements by filtering out long-term trends.

/_SECTION_BEGIN("DPO");
function DetrendedPriceOsc( Periods ) 
{
 return C - Ref( MA( C, Periods ), -( 1 + Periods/2 ) );
}

Plot( DetrendedPriceOsc( Param("Periods", 20, 1, 100 ) ),
		_DEFAULT_NAME(),
		ParamColor("Color", ColorCycle ) );
_SECTION_END();

_SECTION_BEGIN("EMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();

_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();

Open chat
1
Hi, how can I help you?