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.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。