OPEN-SOURCE SCRIPT
Dynamic Median Momentum Oscillator [AlgoAlpha]

🟠OVERVIEW
This script provides a momentum oscillator that uses a median-based approach rather than traditional averages to find the center of price action. By calculating the distance between the current price and a rolling median (HLC3), it identifies how far the market has stretched from its historical equilibrium. The indicator is designed to filter out the noise typical of standard momentum tools, using a standardized range calculation to provide fixed overbought and oversold zones. It helps traders identify trend strength, potential exhaustion, and mean reversion opportunities across different market conditions.
🟠CONCEPTS
The core of this tool is the Dynamic Median basis, which uses a rolling median of the HLC3 price to establish a "fair value" line. Unlike a simple moving average, the median is less sensitive to extreme price spikes, making the resulting oscillator more robust against outliers. To ensure the oscillator remains readable across different assets, the raw difference between price and median is standardized by the average candle range (EMA of High-Low). This normalization allows for the use of fixed thresholds (e.g., +/- 200, 250, 300) regardless of the asset's price. The median sets the context for the baseline, while the smoothed MCD and its signal line provide the timing for entries and exits.
🟠FEATURES
🟠USAGE
This script provides a momentum oscillator that uses a median-based approach rather than traditional averages to find the center of price action. By calculating the distance between the current price and a rolling median (HLC3), it identifies how far the market has stretched from its historical equilibrium. The indicator is designed to filter out the noise typical of standard momentum tools, using a standardized range calculation to provide fixed overbought and oversold zones. It helps traders identify trend strength, potential exhaustion, and mean reversion opportunities across different market conditions.
🟠CONCEPTS
The core of this tool is the Dynamic Median basis, which uses a rolling median of the HLC3 price to establish a "fair value" line. Unlike a simple moving average, the median is less sensitive to extreme price spikes, making the resulting oscillator more robust against outliers. To ensure the oscillator remains readable across different assets, the raw difference between price and median is standardized by the average candle range (EMA of High-Low). This normalization allows for the use of fixed thresholds (e.g., +/- 200, 250, 300) regardless of the asset's price. The median sets the context for the baseline, while the smoothed MCD and its signal line provide the timing for entries and exits.
🟠FEATURES
- Standardization feature to enable fixed overbought/oversold levels across any asset
- Multi-component display: Fast (histogram), Slow (lines), and Super Slow (filled zones)
- Reversion markers (triangles) indicating price returning from extreme levels
🟠USAGE
- Setup: Add the script to your chart and choose your preferred Display Mode. Use "All" to see the full picture or "Slow" for a cleaner view of trend direction. Ensure "Standardize" is checked if you want to use the built-in overbought/oversold bands effectively.
- Read the chart: Look for the Smooth MCD (white line) crossing the Signal (orange line) for momentum shifts. Values above 0 indicate bullish momentum, while values below 0 indicate bearish momentum. Triangles appear at the top or bottom of the oscillator when price reaches extreme levels (300/-300) and begins to revert to the mean.
- Settings that matter: The Basis Length determines how much historical data defines the "center" of the market; longer lengths are better for higher timeframes. Smoothing Length controls the reactivity of the main white line—increase this if you find the oscillator is giving too many false signals in choppy markets.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
🚨Get premium: algoalpha.io
🛜Get FREE signals: discord.gg/xCmqTVRexz
💡Tutorials: youtube.com/@AlgoAlpha
🛜Get FREE signals: discord.gg/xCmqTVRexz
💡Tutorials: youtube.com/@AlgoAlpha
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
🚨Get premium: algoalpha.io
🛜Get FREE signals: discord.gg/xCmqTVRexz
💡Tutorials: youtube.com/@AlgoAlpha
🛜Get FREE signals: discord.gg/xCmqTVRexz
💡Tutorials: youtube.com/@AlgoAlpha
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。