OPEN-SOURCE SCRIPT
מעודכן

Chaikin Oscillator Z-Score With Divergences [MAXmks]

826
Hello Traders,

This is my take on the Chaikin Oscillator — statistically normalized into a Z-Score with built-in divergence detection.

The problem with raw Chaikin
The standard ChO is unbounded and extremely sensitive to volume spikes. A single anomalous bar can flatten the entire oscillator, making it hard to compare signals across time or between instruments.

The fix
Z-Score normalization with asinh (inverse hyperbolic sine) transformation. While standard Z-Scores assume a normal distribution, market data often features "fat tails" (extreme outliers). This transformation compresses those spikes effectively, ensuring the indicator remains responsive without getting stuck during high-volatility events. The result: a more comparable scale across instruments.

What's inside:

  • [—] Adaptive normalization + EMA-based variance for smooth Z calculation
    [—] Regular and hidden divergence detection with segment validation (fewer false signals)
    [—] Gradient coloring that intensifies toward extremes
    [—] Dashboard with current Z value
    [—] Pre-built alerts for OB/OS entries/exits and all divergence types


Note: This is a volume-based indicator. No volume = no signal. If you see "No Volume Data" in the dashboard, switch to a data source that provides volume.

Works on any timeframe. Feedback welcome.
For analysis purposes, not financial advice.
הערות שחרור
1. Fixed long-history “empty/short” plotting on some symbols/timeframes by preventing early na cascade in the smoothing/normalization chain (EMA inputs are now safely stabilized).

2. Warmup logic aligned to the actual required history: the indicator starts producing values after the longest active lookback (max of the smoothing and Z-score lengths), instead of staying silent longer than needed.

3. Added a dashboard warning when the chart has insufficient bars for a reliable output (“Need X+ bars”), so you immediately see why values may be missing.

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.