What this TradingView script does
Regime Filter is a dual-factor trend condition tool combining price trend momentum and volume expansion into a single, easy-to-read visual framework. It quantifies recent trend direction and volume shifts, then shows them as:
- Two oscillator plots for Trend and Volume regimes
- Dynamic candle coloring for trend clarity
- A quadrant scatter map in your chart corner for immediate regime recognition.
This filter helps traders quickly detect when a trend is healthy & confirmed by strong volume, or weakening & vulnerable due to low volume.
🔵 CONCEPTS
- Trend Oscillator: A loop-based trend value calculated by comparing the current smoothed price (HMA of HLC3) against its own trailing history. Positive values indicate trend-up regimes, negative values signal trend-down phases.
- Volume Oscillator: Similar loop logic but on smoothed volume (HMA of Volume) — highlighting whether trading activity is expanding or contracting relative to past bars.
hma = ta.hma(hlc3, 15) vol = ta.hma(volume, 15)
for i = 0 to len if hma > hma trend += 1 else trend -= 1
How traders can use it
Use Regime Filter as a chart context layer inside TradingView: read the structure it highlights, compare it with your market bias, and let the script narrow which moves deserve attention.
The strongest workflow is to combine the script with higher timeframe structure, volume context, and a repeatable execution plan instead of treating any single label as a standalone trade.




