Skip to main content

Head and Shoulders Detection

Head and Shoulders Pattern identifies classic and inverse head and shoulders formations using swing-based recognition with dual-size scanning and configurable accuracy constraints. The indicator detects both single and double head/shoulder variants automatically.

Pattern Types

Head and shoulders pattern structure with labeled components

Classic Head and Shoulders (Bearish)

A classic H&S forms after an uptrend and signals a potential bearish reversal. The pattern consists of three peaks — a central higher peak (head) flanked by two lower peaks (shoulders). A neckline connects the reaction lows between the peaks. Breakout occurs when price closes below the neckline.

Inverse Head and Shoulders (Bullish)

An inverse H&S forms after a downtrend and signals a potential bullish reversal. The pattern consists of three troughs — a central deeper trough (head) flanked by two shallower troughs (shoulders). A neckline connects the reaction highs. Breakout occurs when price closes above the neckline.

Pattern Variants

The Head and Shoulders Pattern indicator detects multiple structural variants beyond the textbook formation:

  • Single-top head — Standard single peak/trough at the head
  • Double-top head — Two peaks/troughs forming the head (resembling a small double top/bottom within the H&S)
  • Single shoulders — One peak/trough per shoulder
  • Double shoulders — Two peaks/troughs per shoulder (wider, more complex formations)

Dual-Size Detection

The Head and Shoulders Pattern indicator runs two independent detection layers simultaneously. Each layer uses its own swing sensitivity.

LayerDefault SizePurpose
Pattern 1Very Small (5)Shorter-term reversal patterns — more frequent detections
Pattern 2Medium (10)Larger structural reversals — less frequent, more significant

Pattern Size Presets:

PresetSwing Size
Tiny2
Very Small (default)5
Small7
Medium10
Large16
Very Large20
Huge30
Custom1-300

Neckline Modes

The Head and Shoulders Pattern indicator offers two neckline calculation methods:

ModeDefaultHow It Works
Sloped (default)OnConnects the actual swing points at their true price levels, producing an angled neckline
StraightOffDraws a horizontal neckline — simpler geometry, requires more symmetric patterns

Sloped necklines better represent asymmetric patterns where the two shoulders form at different price levels. Straight necklines are useful for textbook-style formations where horizontal precision matters.

Accuracy Control

The Accuracy setting controls how strictly the pattern geometry must conform to ideal proportions — including shoulder symmetry, head prominence, and neckline alignment.

PresetValueWhat It Does
Very Low (default)0Most permissive — detects the widest range of H&S formations
Low25Relaxed constraints
Medium50Balanced detection quality
High75Stricter geometric requirements
Very High100Most strict — only near-ideal symmetry qualifies
Custom0-100Manual control

Log Scale

The Head and Shoulders Pattern indicator uses logarithmic scale by default for all internal calculations. Log scale normalizes the pattern geometry across different price levels, ensuring consistent detection quality on any instrument.

SettingDefaultWhat It Controls
Log ScaleOnWhether calculations use logarithmic or linear price scale

Breakout Confirmation

A breakout is confirmed when price closes beyond the neckline:

  • Classic H&S → price closes below the neckline (bearish breakout)
  • Inverse H&S → price closes above the neckline (bullish breakout)

Classic head and shoulders pattern with trade setup showing stop loss, entry, and three take profit targets on NVDA

Upon breakout, the Head and Shoulders Pattern indicator automatically calculates entry, stop loss, and up to three take profit levels. The neckline color indicates the pattern direction — pink for classic (bearish) and blue for inverse (bullish).

FAQ

How does the Head and Shoulders Pattern detect patterns?

The Head and Shoulders Pattern indicator uses swing-based recognition to identify the three-peak structure. Two independent detection sizes run simultaneously at different swing sensitivities. The indicator validates shoulder symmetry, head prominence, and neckline geometry against configurable accuracy constraints.

What is the difference between straight and sloped necklines?

A straight neckline draws a horizontal line connecting the two trough points (or peak points for inverse H&S). A sloped neckline connects the actual swing points at their true price levels, producing an angled neckline that better represents asymmetric patterns where the two sides form at different levels.

What accuracy level should I use for head and shoulders patterns?

The Head and Shoulders Pattern indicator defaults to Very Low accuracy, which detects the most patterns with looser geometric constraints. Increase accuracy to Medium or High for stricter shoulder symmetry and neckline alignment. Higher accuracy produces fewer but more structurally precise patterns.

Does the indicator detect double-top head variants?

Yes, the Head and Shoulders Pattern indicator detects both single-top and double-top head variants automatically. It also recognizes single and double shoulder configurations on both sides, covering a wide range of real-world H&S formations.

Next Steps