




Rolling Z-Score Trend
A clean, statistical trend & momentum indicator that transforms price into a rolling Z-Score—making regime shifts, momentum bursts, and threshold events easy to spot.
Overview
Rolling Z-Score Trend normalizes price relative to its recent mean and volatility using a rolling Z-Score. This makes market conditions easier to compare across instruments and sessions, because the indicator adapts to changing volatility automatically.
Instead of guessing whether a move is “big enough,” you see how far price is from its statistical average in standard deviations—then get a smoothed signal and clear threshold levels.
How It Works
- Rolling Mean + Volatility
The indicator calculates a moving average (mean) and standard deviation over the selected Lookback Period. - Z-Score Calculation
Z-Score = (Price − Mean) / Standard Deviation
This shows whether price is statistically above or below its recent “normal range.” - Smoothing for Readability
A short EMA is applied to reduce noise and produce a cleaner trend signal. - Momentum Background
A momentum histogram tracks the change in the smoothed Z-Score to highlight acceleration and deceleration.
Key Features
✅ Directional Z-Score Lines (Split Output)
- ZScore Up displays positive values (bullish bias)
- ZScore Down displays negative values (bearish bias)
This makes direction instantly visible.
✅ Threshold Zones (Overbought / Oversold Framework)
Set an Entry Threshold (e.g., 1.5 or 2.0) and the indicator draws:
- Zero line (neutral regime)
- Upper threshold (+EntryThreshold)
- Lower threshold (−EntryThreshold)
✅ Preset-Based Configuration
Includes quick presets such as:
- Scalping
- Swing Trading
- Trend Following
Each preset adjusts lookback/threshold inputs for that style.
✅ Momentum Histogram
Shows the rate of change in the smoothed Z-Score (scaled) to help:
- identify momentum bursts early
- detect fading trends
- time entries after a reset
✅ Optional Info Table
A compact table can display:
- current Z-Score value + bias (Bullish/Bearish)
- momentum state (Rising/Falling)
- current threshold level
You can choose the table position (TopRight, BottomLeft, etc.).
✅ Event Logging (Optional)
Can print messages for key events such as:
- bullish/bearish crossover through zero
- entering/exiting the overbought zone
- entering/exiting the oversold zone
How Traders Use It (Practical)
1) Regime / Bias
- Z-Score above 0 → bullish statistical regime
- Z-Score below 0 → bearish statistical regime
- Frequent flips around 0 → potential range / chop conditions
2) Extremes & Mean Reversion
- Above +threshold → statistically stretched (often “overbought”)
- Below −threshold → statistically stretched (often “oversold”)
Used for: - mean-reversion setups (fading extremes)
- confirming strong trends (holding beyond thresholds)
3) Momentum Timing
- Momentum rising → acceleration
- Momentum falling → deceleration
Useful for managing entries/exits and avoiding late signals.
Best Markets / Timeframes
Works well across indices, FX, metals, and crypto. The volatility-normalized approach helps it adapt to different instruments and conditions.
Suggested Starting Settings
- Scalping: Lookback 10–14, Threshold 1.0–1.4
- Swing: Lookback 20–30, Threshold 1.5–2.0
- Trend: Lookback 35–50, Threshold 2.0–2.5
Disclaimer
This indicator is a tool for analysis and education. It does not guarantee results. Always use proper risk management and confirm signals with your trading plan.

















.png)

.jpg)
.png)







