PPO (Price Percent Oscillator) for ThinkorSwim

BenTen

BenTen

Administrative
Staff
VIP
PPO is similar to MACD. The oscillator is displayed as a percentage so is consistent between all equities.

This script for ToS was created by Mobius.



thinkScript Code

Code:
# PPO
# Mobius
# V01.03.2014

declare lower;

input c = close;
input AvgType = AverageType.Simple;
input nFast = 8;
input nSlow = 13;
input nSmooth = 5;

plot PPO = ((MovingAverage(AverageType = AvgType, c, nFast) -
             MovingAverage(AverageType = AvgType, c, nSlow)) /
             MovingAverage(AverageType = AvgType, c, nSlow));
PPO.SetPaintingStrategy(PaintingStrategy.Histogram);
PPO.AssignValueColor(if PPO > 0
                     then color.green
                     else color.red);

plot smooth = MovingAverage(AverageType = AvgType, PPO, nSmooth);
smooth.SetPaintingStrategy(PaintingStrategy.Line);
smooth.SetDefaultColor(Color.Cyan);
# End Code PPO

Shareable Link

https://tos.mx/hv8hVf
 
horserider

horserider

Well-known member
VIP
The Mobius version BenTen put up is a SMA version of the PPO. The original PPO formula I believe uses the EMA.
skynetgen uses the EMA PPO formula with interesting additions.

If want a simple PPO displayed https://tos.mx/NCheJqs
If want a daily/weekly PPO it is a ToS study. Search studies for it.

I Believe the Ultimate MACD will give equivalent signals plus more info.
 

Similar threads

Top