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 อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน