OPEN-SOURCE SCRIPT
Williams Alligator Spread Oscillator (WASO)

Short description (About box)
Williams Alligator Spread Oscillator (WASO) converts Bill Williams’ Alligator into a 0–100 oscillator that measures the average distance between Lips/Teeth/Jaw relative to ATR. High = expansion/trend (default), low = compression/range — making sideways markets easier to spot. Includes adaptive normalization, configurable thresholds, background shading, and alerts.
Full description (Description field)
What it does
The Williams Alligator Spread Oscillator (WASO) transforms Bill Williams’ Alligator into a single, adaptive 0–100 scale. It computes the average pairwise distance among the Alligator lines (Lips/Teeth/Jaw), normalizes it by ATR and a rolling min–max window, and smooths the result. This makes the signal robust across symbols and timeframes and explicitly improves detection of sideways (ranging) conditions by highlighting compression regimes.
Why it helps
Sideways detection made easier: Low WASO marks compressed regimes that commonly align with consolidation/range phases, helping you identify chop and plan breakout strategies.
Trend/expansion clarity: High WASO indicates the Alligator lines are widening relative to volatility, pointing to trending or expanding conditions.
You can flip the direction if you prefer “High = Range.”
How it is calculated (plain English)
Smooth price with RMA (SMMA-like) to get Jaw, Teeth, Lips.
Compute the average pairwise distance between these three lines.
Divide by ATR to remove price-scale effects.
Normalize with a rolling min–max window to map values to 0–100.
Optionally apply EMA smoothing to the oscillator.
Key settings
Jaw/Teeth/Lips Lengths: Alligator periods (SMMA-like via ta.rma).
ATR Length: Volatility benchmark for scaling.
Normalization Lookback: Longer = steadier; shorter = more responsive.
Smoothing (EMA): Evens out noise.
High Value = Large Spread (Trend): Toggle to invert semantics.
Upper/Lower Thresholds: 70/30 are practical starting points.
Signals / interpretation
Sideways / Compression (easier to spot):
Default direction: WASO below Lower Threshold (e.g., <30).
With inverted direction OFF: WASO above Upper Threshold (e.g., >70).
Trend / Expansion:
Default direction: WASO above Upper Threshold (e.g., >70).
With inverted direction OFF: WASO below Lower Threshold (e.g., <30).
Midline (50): Neutral zone; flips around 50 can hint at regime shifts.
Alerts included
Range Start (sideways/compression)
Trend Start (expansion/trend)
Notes & limitations
This implementation omits the classic forward shift of Alligator lines to keep signals usable on live bars.
If market behavior shifts (very quiet or very volatile), tune Lookback and ATR Length.
Combine WASO with breakout levels or momentum filters for entries/exits.
Credits & disclaimer
Inspired by Bill Williams’ Alligator.
For educational purposes only. Not financial advice.
Release Notes (v1.0):
Initial release of Williams-Alligator Spread Oscillator (WASO) with ATR-based scaling and adaptive 0–100 normalization.
Direction toggle (High = Trend by default), adjustable thresholds, background shading, and two alert conditions.
Williams Alligator Spread Oscillator (WASO) converts Bill Williams’ Alligator into a 0–100 oscillator that measures the average distance between Lips/Teeth/Jaw relative to ATR. High = expansion/trend (default), low = compression/range — making sideways markets easier to spot. Includes adaptive normalization, configurable thresholds, background shading, and alerts.
Full description (Description field)
What it does
The Williams Alligator Spread Oscillator (WASO) transforms Bill Williams’ Alligator into a single, adaptive 0–100 scale. It computes the average pairwise distance among the Alligator lines (Lips/Teeth/Jaw), normalizes it by ATR and a rolling min–max window, and smooths the result. This makes the signal robust across symbols and timeframes and explicitly improves detection of sideways (ranging) conditions by highlighting compression regimes.
Why it helps
Sideways detection made easier: Low WASO marks compressed regimes that commonly align with consolidation/range phases, helping you identify chop and plan breakout strategies.
Trend/expansion clarity: High WASO indicates the Alligator lines are widening relative to volatility, pointing to trending or expanding conditions.
You can flip the direction if you prefer “High = Range.”
How it is calculated (plain English)
Smooth price with RMA (SMMA-like) to get Jaw, Teeth, Lips.
Compute the average pairwise distance between these three lines.
Divide by ATR to remove price-scale effects.
Normalize with a rolling min–max window to map values to 0–100.
Optionally apply EMA smoothing to the oscillator.
Key settings
Jaw/Teeth/Lips Lengths: Alligator periods (SMMA-like via ta.rma).
ATR Length: Volatility benchmark for scaling.
Normalization Lookback: Longer = steadier; shorter = more responsive.
Smoothing (EMA): Evens out noise.
High Value = Large Spread (Trend): Toggle to invert semantics.
Upper/Lower Thresholds: 70/30 are practical starting points.
Signals / interpretation
Sideways / Compression (easier to spot):
Default direction: WASO below Lower Threshold (e.g., <30).
With inverted direction OFF: WASO above Upper Threshold (e.g., >70).
Trend / Expansion:
Default direction: WASO above Upper Threshold (e.g., >70).
With inverted direction OFF: WASO below Lower Threshold (e.g., <30).
Midline (50): Neutral zone; flips around 50 can hint at regime shifts.
Alerts included
Range Start (sideways/compression)
Trend Start (expansion/trend)
Notes & limitations
This implementation omits the classic forward shift of Alligator lines to keep signals usable on live bars.
If market behavior shifts (very quiet or very volatile), tune Lookback and ATR Length.
Combine WASO with breakout levels or momentum filters for entries/exits.
Credits & disclaimer
Inspired by Bill Williams’ Alligator.
For educational purposes only. Not financial advice.
Release Notes (v1.0):
Initial release of Williams-Alligator Spread Oscillator (WASO) with ATR-based scaling and adaptive 0–100 normalization.
Direction toggle (High = Trend by default), adjustable thresholds, background shading, and two alert conditions.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。