Price Percent Oscillator & Histogram
The Percentage Price Oscillator (PPO) is found by subtracting a long moving average from a shorter moving average, then dividing the result by the longer moving average. It is very similar to MACD which plots the difference between the short and long averages. PPO divides the difference by the longer average which calculates the value as a percentage of the longer average.
PPO = (12 day MA - 26 Day MA) / 26 Day MA
A moving average of this plot is then added as a signal line. The histogram is simply the difference between the PPO line and the signal line.
t is the Average Type. Leave blank for Simple, X for Exponential, F for Front Weighted, or H for Hull.
s is the short period which must be an integer.
l is the long period which must be an integer.
x is the trigger period which must be an integer.
z is the offset. An offset of 1 returns the value for the previous bar instead of the current bar.
An exponential PPO 12,26 can be written as follows.
100 * (XAVGC12 / XAVGC26 - 1)
A 9 period exponential trigger of the exponential PPO 12,26 can be written as follows.
100 * XAVG((XAVGC12 / XAVGC26 - 1), 9)
The exponential PPO Histogram 12,26,9 is the difference between the raw PPO and its moving average trigger.
100 * (XAVGC12 / XAVGC26 - XAVG(XAVGC12 / XAVGC26, 9))
Read more about Price Percent Oscillator (PPO) at Investopedia