Median Price RSI Deviation
Apr 29, 2025

The Median Price RSI Deviation indicator is a sophisticated trend-filtering tool that combines median price smoothing, customizable moving averages, and standard deviation bands to pinpoint market momentum and potential trend reversals. By processing price data through multiple layers of smoothing, it provides a refined view of RSI behavior compared to standard oscillators.
Usage
The indicator can be used to identify trend shifts based on the interaction between the smoothed RSI, its volatility bands, and fixed thresholds.
- Bullish Signal: A bullish condition is identified when the upper standard deviation band crosses above the defined long threshold (default 50). In this state, the indicator highlights potential upward momentum.
- Bearish Signal: A bearish condition occurs when the smoothed RSI line drops below the defined short threshold (default 40), signaling a potential downward trend or loss of strength.
- Trend Visualization: The indicator colors the RSI and its bands based on the detected trend. Users can monitor the relationship between the smoothed RSI and the 70/30/50 horizontal levels for additional overbought or oversold context.
Details
The script executes a multi-step calculation process to ensure signal stability:
- Median Filtering: Price is first smoothed using a median filter (percentile nearest rank at 50%) to reduce the impact of outliers.
- RSI Calculation: The Relative Strength Index is calculated using the median-smoothed price.
- Secondary Smoothing: The resulting RSI is further smoothed using a selectable Moving Average (SMA, EMA, DEMA, or VWMA).
- Volatility Bands: Standard deviation bands are calculated around the smoothed RSI to account for the volatility of the oscillator itself.
Settings
Price Settings
- Price Source: Determines the input price data used for calculations (e.g., Close, Open, HL2).
- Median Length: Sets the lookback period for the initial median price smoothing.
RSI Settings
- RSI Length: The period used to calculate the Relative Strength Index.
- Smoothing Length: The period for the moving average applied to the RSI.
- Standard Deviation Length: The lookback period for calculating the bands around the smoothed RSI.
- Standard Deviation Multiplier: Adjusts the width of the volatility bands.
- Choose MA: Selects the type of smoothing applied to the RSI (EMA, SMA, DEMA, VWMA, or None).
- RSI Long Threshold: The level the upper band must exceed to trigger a bullish signal.
- RSI Short Threshold: The level the smoothed RSI must drop below to trigger a bearish signal.
FAQ
How do I use the Median Price RSI Deviation?
You can use it as a trend filter to confirm entries or exits. Bullish signals appear when the upper band breaks the long threshold, while bearish signals appear when the RSI falls below the short threshold.
What is the advantage of using Median Price?
Median smoothing helps eliminate noise and extreme price spikes, providing a more stable foundation for the RSI calculation than raw closing prices.
How can I access this tool?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.