PROTECTED SOURCE SCRIPT

Williams %R with Head & Shoulders Pattern Detection

21
What makes this indicator special?

This indicator merges two proven trading concepts into one powerful tool:

https://www.tradingview.com/x/vcnNeKTQ/

https://www.tradingview.com/x/TISr7Lo3/

1️⃣ Smoothed Williams %R
The classic Williams %R momentum oscillator is smoothed by an EMA to reduce market noise and deliver cleaner signals. The result: fewer false signals, better readability.

2️⃣ Automatic Pattern Recognition
The indicator continuously scans for the two most powerful reversal formations in technical analysis:

🔴 Head & Shoulders (Bearish) → Short signals
🟢 Inverse Head & Shoulders (Bullish) → Long signals

Why detect patterns in the oscillator instead of the chart?


Pattern formations in Williams %R often emerge earlier than in the price chart itself.
The momentum oscillator reveals weakness or strength before it manifests in price – a crucial timing advantage.

Features at a Glance

📊Dual Signal SystemCombines pattern-based entries with classic crossover signals

🎨 Full VisualizationShoulders, head, neckline, and entry levels are automatically drawn⚙️ Customizable ParametersSymmetry tolerance, pattern size, and visualization individually adjustable

🔔 Alert-ReadyPre-configured alerts for all signal types

📋 Live Status TableDisplays detected patterns and current %R value in real-time

Signal Logic
Pattern Entries:

SHORT: H&S detected + Williams %R crosses neckline downward
LONG: Inverse H&S detected + Williams %R crosses neckline upward

Simple Entries (additional):

Crossover at -80 (oversold → Long)
Crossunder at -23 (overbought → Short)

Recommended Settings
Default values are optimized for most timeframes. For higher timeframes (4H+), consider increasing shoulder tolerance to 20%.

⚠️ Disclaimer: This indicator is an analysis tool and not financial advice. Always combine signals with your own risk management and additional analysis.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.