AlgoAlpha
TradingView IndicatorFree to Use

Stochastic Z-Score

Free TradingView Indicator by AlgoAlpha — Momentum & Oscillators

This indicator is a custom-built oscillator called the [b]Stochastic Z-Score[/b], which blends a volatility-normalized Z-Score with stochastic principles and smooths it using a Hull Moving Average (HMA). It transforms raw price deviations into a normalized momentum structure, then processes that through a stochastic function to better identify extreme moves. A secondary long-term momentum component is also included using an ALMA smoother. The result is a responsive oscillator that reacts to sharp imbalances while remaining stable in sideways conditions. Colored histograms, dynamic oscillator bands, and reversal labels help users visually assess shifts in momentum and identify potential turning points.

56.6kviews
4.1kboosts
2025-07-26published

Stochastic Z-Score Features

Z-Score histogram with gradient color to visualize deviation intensity (optional toggle).
TradingView Chart Snapshot
TradingView Snapshot
Primary oscillator line (smoothed stochastic Z-Score) with adaptive coloring based on momentum direction.
TradingView Chart Snapshot
TradingView Snapshot
Dynamic bands at ±2 and ±2.5 to represent regular vs extreme momentum zones.
TradingView Chart Snapshot
TradingView Snapshot
Long-term momentum line (ALMA) with contextual coloring to separate trend phases.
TradingView Chart Snapshot
TradingView Snapshot
Automatic reversal markers when short-term crosses occur at extremes with supporting long-term momentum.
TradingView Chart Snapshot
TradingView Snapshot
Built-in alerts for oscillator direction changes, zero-line crosses, overbought/oversold entries, and trend confirmation.

How Stochastic Z-Score Works

The Z-Score is calculated by comparing price to its mean and dividing by its standard deviation—this normalizes movement and highlights how far current price has stretched from typical values. This Z-Score is then passed through a stochastic function, which further refines the signal into a bounded range for easier interpretation. To reduce noise, a Hull Moving Average is applied. A separate long-term trend filter based on the ALMA of the Z-Score helps determine broader context, filtering out short-term traps. Zones are mapped with thresholds at ±2 and ±2.5 to distinguish regular momentum from extreme exhaustion. The tool is built to adapt across timeframes and assets.

How to Use Stochastic Z-Score

Use this script to track momentum shifts and identify potential reversal areas. When the oscillator is rising and crosses above the previous value—especially from deeply negative zones (below -2)—and the ALMA is also above zero, this suggests bullish reversal conditions. The opposite holds for bearish setups. Reversal labels (

Free on TradingView

Add this indicator to your chart.

Stochastic Z-Score is free to use on TradingView. Add it to any chart in seconds.