ta-oliver / infertrade

Open source trading and investment strategy library designed for accessibility and compatibility
Apache License 2.0
34 stars 20 forks source link

PERCENTAGE PRICE OSCILLATOR (PPO) - DOCUMENTATION (DESCRIPTIONS OF EXISTING RULES/INDICATORS) #165

Closed Cal231995 closed 3 years ago

Cal231995 commented 3 years ago

What Is the Percentage Price Oscillator (PPO)?

The percentage price oscillator (PPO) is a technical momentum indicator that shows the relationship between two moving averages in percentage terms. The moving averages are a 26-period and 12-period exponential moving average (EMA). The PPO is used to compare asset performance and volatility, spot divergence that could lead to price reversals, generate trade signals, and help confirm trend direction.

PPO FORMULA

How to Calculate the Percentage Price Oscillator (PPO)

  1. Calculate the 12-period EMA of the asset's price.
  2. Calculate the 26-period EMA of the asset's price.
  3. Apply these to the PPO formula to get the current PPO value.
  4. Once there are at least nine PPO values, generate the signal line by calculating the nine-period EMA of the PPO.
  5. To generate a histogram reading, take the PPO value and subtract the current signal line value. The histogram is an optional visual representation of the distance between these two lines.

Bullish Reversal: when PPO is above zero Bearish Reversal: when PPO is below zero PPO CHART

The theory suggests that asset price will have a trend shift when the PPO cross above zero levels and vice versa. So:

if PPO > 0 then allocation = max_allocation(long position)

if PPO < 0 then allocation = -max_allocation(short position) else: allocation = 0

Cal231995 commented 3 years ago

What Is the Percentage Price Oscillator (PPO)? The percentage price oscillator (PPO) is a momentum indicator that measures the difference between two moving averages as a percentage of the larger moving average. The moving averages are a 26-period and 12-period exponential moving average (EMA). The Percentage Price Oscillator is shown with a signal line, a histogram and a centerline. Signals are generated with signal line crossovers, centerline crossovers, and divergences. A bullish reversal of an asset is identify when the PPO cross above zero line. And a bearish reversal when the PPO cross below the zero line.

@fhashim Definition free of copyright issues. Thank you