OPEN-SOURCE SCRIPT
Alpha Chart Patterns [AlphaGroup.Live]

What it does
Automatically detects classical patterns and draws clean, price-anchored annotations with a single, text-only label per pattern (no filled background). Each label includes the pattern name and bias (Bullish/Bearish). Uses confirmed pivots, so it’s non-repainting after confirmation.
Detected patterns:
How it works
The script builds swing structure from confirmed pivot highs/lows. Tolerance and minimum swing filters keep only meaningful structures. Triangle detection looks for falling highs / rising lows (or flat sides) within a configurable window. Drawings and labels are anchored to bar_index and the price scale so they follow candles when you pan/zoom.
Inputs
Alerts
One-shot alerts are provided for each pattern. After adding the script to your chart:
Create Alert → Condition: this script → choose the specific pattern event (e.g., “Ascending Triangle”). Alerts trigger once per newly labeled instance.
Tips
Non-repainting note
Patterns are confirmed using completed pivots (labels appear only after the swing completes), so past signals don’t repaint.
Known limitations
Classical pattern recognition is heuristic by nature. Structures can overlap, and triangle classifications may vary with tolerance choices. Tune inputs to your instrument/timeframe.
Open-source
Pine Script v6. Clone, tweak, and share improvements. Please credit “Alpha Chart Patterns” if you fork.
Change log
v1.0 — Initial release: DT/DB, H&S/Inverse, Asc/Desc/Sym triangles, editable colors, minimal labels, price-anchored drawings, one-shot alerts.
Automatically detects classical patterns and draws clean, price-anchored annotations with a single, text-only label per pattern (no filled background). Each label includes the pattern name and bias (Bullish/Bearish). Uses confirmed pivots, so it’s non-repainting after confirmation.
Detected patterns:
- Double Top / Double Bottom
- Head & Shoulders / Inverse H&S
- Triangles: Ascending, Descending, Symmetrical
How it works
The script builds swing structure from confirmed pivot highs/lows. Tolerance and minimum swing filters keep only meaningful structures. Triangle detection looks for falling highs / rising lows (or flat sides) within a configurable window. Drawings and labels are anchored to bar_index and the price scale so they follow candles when you pan/zoom.
Inputs
- Pivot Left/Right Bars: pivot sensitivity (higher = stricter, fewer signals).
- Level Tolerance (%): how close “equal” highs/lows must be (double tops/bottoms, flat triangle sides).
- Min Swing Size (%): filters out tiny wiggles.
- Triangles Window (bars): max span used when validating triangles.
- Max Lookback (bars): limits how far back objects are drawn.
- Label Offset (ATR): vertical offset for labels to avoid covering price.
- Draw Necklines / Borders: toggle helper lines.
- Bullish/Bearish Text & Line Colors + Neutral Line Color: fully editable to match light/dark themes.
Alerts
One-shot alerts are provided for each pattern. After adding the script to your chart:
Create Alert → Condition: this script → choose the specific pattern event (e.g., “Ascending Triangle”). Alerts trigger once per newly labeled instance.
Tips
- If drawings ever appear detached after manual scale changes, enable Pin to right scale in the script’s Style (or just toggle the indicator once).
- For noisier markets/timeframes, increase Pivot Bars and/or Min Swing.
- Combine with trend/volume for confirmation.
Non-repainting note
Patterns are confirmed using completed pivots (labels appear only after the swing completes), so past signals don’t repaint.
Known limitations
Classical pattern recognition is heuristic by nature. Structures can overlap, and triangle classifications may vary with tolerance choices. Tune inputs to your instrument/timeframe.
Open-source
Pine Script v6. Clone, tweak, and share improvements. Please credit “Alpha Chart Patterns” if you fork.
Change log
v1.0 — Initial release: DT/DB, H&S/Inverse, Asc/Desc/Sym triangles, editable colors, minimal labels, price-anchored drawings, one-shot alerts.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.