OPEN-SOURCE SCRIPT
stelaraX - DPO

stelaraX – DPO
stelaraX – Detrended Price Oscillator (DPO) is a cycle-based indicator designed to remove long-term trend components from price action. By isolating short- to medium-term price cycles, it helps traders focus on market rhythm and cyclical turning points rather than overall trend direction.
This indicator is part of the stelaraX ecosystem, focused on clean technical analysis and AI-supported chart evaluation
stelarax.com
Core logic
The Detrended Price Oscillator subtracts a displaced simple moving average from the current price. This displacement shifts the moving average back in time, effectively removing the dominant trend component.
Key principles:
* the lookback period defines the dominant cycle length
* the moving average is shifted backward by half the period plus one
* values above zero indicate price above the detrended mean
* values below zero indicate price below the detrended mean
* oscillations highlight cyclical highs and lows
The DPO is not designed to follow trends but to analyze price cycles and mean reversion behavior.
Visualization
The script plots:
* the DPO line in a separate indicator pane
* green coloring when values are above zero
* red coloring when values are below zero
* a zero reference line for cycle symmetry
This presentation makes cyclical expansions and contractions clearly visible.
Use case
This indicator is intended for:
* identifying cyclical market highs and lows
* timing entries and exits in ranging markets
* analyzing mean reversion behavior
* confirming cycle-based divergences
* supporting non-trend-following and oscillation strategies
It works best when used independently from trend indicators or alongside regime filters.
Disclaimer
This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user.
stelaraX – Detrended Price Oscillator (DPO) is a cycle-based indicator designed to remove long-term trend components from price action. By isolating short- to medium-term price cycles, it helps traders focus on market rhythm and cyclical turning points rather than overall trend direction.
This indicator is part of the stelaraX ecosystem, focused on clean technical analysis and AI-supported chart evaluation
stelarax.com
Core logic
The Detrended Price Oscillator subtracts a displaced simple moving average from the current price. This displacement shifts the moving average back in time, effectively removing the dominant trend component.
Key principles:
* the lookback period defines the dominant cycle length
* the moving average is shifted backward by half the period plus one
* values above zero indicate price above the detrended mean
* values below zero indicate price below the detrended mean
* oscillations highlight cyclical highs and lows
The DPO is not designed to follow trends but to analyze price cycles and mean reversion behavior.
Visualization
The script plots:
* the DPO line in a separate indicator pane
* green coloring when values are above zero
* red coloring when values are below zero
* a zero reference line for cycle symmetry
This presentation makes cyclical expansions and contractions clearly visible.
Use case
This indicator is intended for:
* identifying cyclical market highs and lows
* timing entries and exits in ranging markets
* analyzing mean reversion behavior
* confirming cycle-based divergences
* supporting non-trend-following and oscillation strategies
It works best when used independently from trend indicators or alongside regime filters.
Disclaimer
This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.