Amibroker AFL code for Percentage Price Oscillator

MarketSecrets - Learn To Trade Like a Pro

Amibroker AFL code for Percentage Price Oscillator:

Please find below the AFL code.

Script:

_SECTION_BEGIN(“Percentage Price Oscillator”);

SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat(“{{NAME}} – {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}”, O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( Close, “Price”, colorWhite, styleCandle );
PPOShort = Param(“PPO Short Period”, 12, 1, 150, 1);
PPOLong = Param(“PPO Long Period”, 26, 1, 150, 1);
PPOsignal = Param(“PPOsignal”, 9, 1, 150, 1);
PPO = (EMA(C, PPOShort ) – EMA(C, PPOLong ))/ EMA(C, PPOLong ) * 100;
PPOS = (EMA(ppo, PPOsignal ));
Plot( PPO , “ppo”, colorGreen, styleLine| styleThick| styleOwnScale );
Plot ( PPOS ,”PPO Signal”, colorOrange, styleLine| styleThick | styleOwnScale );

_SECTION_END();

Percentage Price Oscillator

error: Content is protected !!