This is a re-up of my original post a couple of days ago, I made a slight change to the scaling and wanted to make sure you all got the new code!

I felt the PPO offered here was a bit basic, so turned it more into the MACD's look and feel, except this is fully customizable through the options menu for non-coders to make it look exactly as they wish.

To use the code simply click the arrow in the upper right and click "make it mine".
Alternatively you can grab the source here:
Copy and past the code into a new script, removing the default text it gives.

Feel free to leave a comment below if you like it, have a question, or idea!
¸.·´¯`·.´¯`·.¸¸.·´¯`·.¸ If you like the latest in indicators be sure to follow me, more scripts coming soon! ¸.·´¯`·.´¯`·.¸¸.·´¯`·.¸
Remove from Favorite Scripts Add to Favorite Scripts
study(title="Advanced Percentage Price Oscillator", shorttitle="Advanced PPO")

//                                             //
//           ADVANCED PPO BY THELARK           //
//                 ~ 2-10-14 ~                 //
//                                             //
//                     •/•                     //
//                                             //
//    //
//                                             //

src = close
shortlen=input(9, minval=1, title="Short Length") 
longlen=input(26, minval=1, title="Long Length")
dosig=input(true,title="Show Signal?")
dohist=input(true,title="Show Histogram?")
smooth=input(9, minval=1, title="Signal Smoothing")

short = ema(src, shortlen)
long = ema(src, longlen)
ppo = ((short - long)/long)*100
sig = ema(ppo,smooth)

plot(ppo, title="PPO", color=#0094FF)
plot(dosig?sig:na, title="signal", color=#FA6901)
plot(dohist?ppo-sig:na,color=#FF006E,style=histogram )
Thanks. A good improvement on the standard MACD. To learn more about PPO go to
I love this indicator! I started integrating MACD to my trades and I think I will replace it with this. Thanks for sharing!
Neat indicator, Can you tell us a bit of what's special about this indicator?
Sure! This is actually pretty simple, it is PPO styled as a typical MACD. PPO and MACD are fairly similar indicators, but some people prefer the PPO calculation because they feel it gives better signals across different underline symbols, without having to change the default settings. This is because the MACD is more of a raw number derived from the difference of a fast and slow moving average. The PPO is the percentage difference between two MA's.

TradingView's version of PPO is a single line, here I've added a signal line (default's to a 9ema of PPO), and a histogram, which is the difference between the PPO and the signal.
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out