
Pinescriptlabs Store indicators: š¤Pinescriptlabs Store cBots : (cBot)
Gold & BTC BreakoutSession Pivots(new)
SmartTrend Support &
Resistance
Lines
Dynamic
Market Structure
Analysis
of
Turning Points
Fibonacci
Linear
Regression
Multi-timeframe
Auto
Support and
Resistance
Trend
Lines
All
Support and
Resistance
Levels
The Z-Score transforms price into a "standard
deviation" scale,
showing how far each candleās close (or open, high, low) deviates from its
historical mean. With an intuitive visual, it helps identify overbought/oversold
conditions and
high-probability reversal zones! š
1ļøā£ What Does It Do?
š¹ Standardizes Price: Converts the absolute closing value into a Z-Scoreāhow many standard deviations it is from the mean
of the last N bars.
š¹ Highlights
Statistical Extremes: Values
near ±1, ±2, or ±3 indicate rarity in price movement:
- ±1 SD (ā 68% probability between ā1 and 1)
- ±2 SD (ā 95% probability between ā2 and 2)
- ±3 SD (ā 99.7% probability between ā3 and 3)
š¹ Aids
in Mean Reversion Trading:
When Z-Score exceeds ±2 or ±3, the market is in an extreme
zone and tends to
revert toward the mean (zero).
š¹ Clear
Visualization: Using histograms (or special candles), a moving average
line, and colored zones, you can instantly see if price is behaving "normally" or is a statistical
outlier.
2ļøā£ How Does It Work?
š Calculation of Mean & Standard Deviation
- A lookback
period (e.g., 99
bars) is used. - The mean and standard
deviation (SD) of
closing prices are calculated. - Higher SD = More volatility in price movements.
š§® Z-Score Formula
Z=Current CloseāHistorical MeanStandard DeviationZ=Standard DeviationCurrent CloseāHistorical Meanā
- Positive Z ā Close above the mean.
- Negative Z ā Close below the mean.
š Z-Table Probabilities
- Highlights the
current Z-Scoreās column to show how rare/extreme the price is!
3ļøā£ How to Use It in Trading
ā
Mean Reversion: Look for Z > +2 or Z < ā2 to trade reversals (sell overbought
extremes, buy oversold extremes).
ā
Trend Confirmation: A sustained Z
> 0 + rising moving average signals
strength; Z < 0 + falling MA suggests weakness.
ā
Risk Management: Near ±1 SD, expect normal moves; near ±3
SD, adjust stops &
position sizes carefully.
ā
Entry Timing: Combine extreme Z-Scores with support/resistance
levels for precise
entries.
4ļøā£ Pros & Considerations
āļø Advantages
- Statistical edge in spotting extreme price conditions.
- Multiple display modes (histogram, candles, bands, probability
table). - Easy customization (length, colors, chart type).
ā ļø Considerations:
- In strong
trends, price can stay
"extreme" for long periods without reversing. - Assumes a normal
distributionāmay not
work well in highly volatile/skewed markets. - Best used in stable
volatility environments.