OPEN-SOURCE SCRIPT

Stochastic Z-Score [AlgoAlpha]

21 264
🟠OVERVIEW
This indicator is a custom-built oscillator called the Stochastic Z-Score, 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.

🟠CONCEPTS
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.

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


🟠USAGE
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 ("▲" and "▼") appear only when both short- and long-term conditions align. The ±2 and ±2.5 thresholds act as momentum warning zones; values inside are typical trends, while those beyond suggest exhaustion or extremes. Adjust the length input to match the asset’s volatility. Enable the histogram to explore underlying raw Z-Score movements. Alerts can be configured to notify key changes in momentum or zone entries.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.