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
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.
Indicatore Pine Script®






















