OPEN-SOURCE SCRIPT
Elliott Wave Pattern Analyzer

Elliott Wave Pattern Analyzer
Overview
This indicator automatically detects Elliott Wave impulse patterns and diagonal formations on your chart. It analyzes price structure based on classic Elliott Wave rules and displays wave counts with confidence scores, Fibonacci projections, and invalidation levels.
Why I Built This
After reading Glenn Neely's book on Elliott Wave theory, I wanted to put my learning into practice by building something tangible. There's no better way to understand a concept than trying to code it!
I'll be honest – corrective wave patterns (zigzags, flats, triangles, combinations) were simply too complex for me to implement reliably. So instead, I focused on what I could manage: impulse waves and diagonal patterns. Maybe someday I'll tackle the corrections, but for now, this is my humble contribution.
The retracement visualization style was inspired by LuxAlgo's elegant approach – credit where credit is due!
How It Works
1. Wave Detection
The indicator uses pivot points to identify potential 5-wave structures:
WaveRuleWave 2Cannot retrace more than 100% of Wave 1Wave 3Cannot be the shortest among Waves 1, 3, 5Wave 4Should not overlap Wave 1 territory (impulse)Wave 5Completes the motive structure
2. Pattern Types
Impulse Waves
Classic 5-wave motive structure
Wave 3 typically extends (≥1.618 of Wave 1)
Strict mode enforces all Elliott rules
Diagonal Patterns
Ending diagonal (wedge-shaped)
Waves progressively contract
Lines 1-3 and 2-4 converge to an apex
Often signals trend exhaustion
3. Confidence Scoring
Each pattern receives a confidence score (0-100%) based on:
Fibonacci ratio adherence
Wave proportion relationships
Rule compliance
Structural clarity
Only patterns exceeding your threshold (default: 60%) are displayed.
4. Fibonacci Projections
After Wave 5 completion, the indicator projects potential retracement levels:
0.382, 0.500, 0.618, 0.786 of the entire impulse
5. Extension Channel
Connects Wave 0 origin to the retracement low, projecting:
0.618, 1.000, 1.272, 1.618 extensions
Optional extended levels: 2.000, 2.618, 4.236
6. Invalidation Levels
Shows the price level where the wave count becomes invalid – helping you know when your analysis is wrong.
Settings Explained
Impulse Wave Settings
Pivot Length: Sensitivity of wave detection (recommended: 5, 7, 14)
Strict Mode: Enforce all classic Elliott rules
Min Wave 3 Extension: Minimum ratio for Wave 3 (default: 1.618)
Diagonal Wave Settings
Allow Wave 4-1 Overlap: Required for valid diagonals
Extend Trendline: Project diagonal boundaries forward
Projection Settings
Fibonacci Levels: Customize retracement targets
Extension Bars: How far projections extend on chart
Pattern Management
Max Patterns: Limit displayed patterns to reduce clutter
Pattern Lifetime: Auto-remove old patterns after X bars
Use Cases
Trend Trading: Enter on Wave 3 or Wave 5 breakouts
Reversal Spotting: Diagonal completion often signals reversals
Target Setting: Use Fibonacci extensions for take-profit levels
Risk Management: Invalidation levels provide clear stop-loss references
Notes
This indicator uses pivot detection and may repaint – signals are confirmed after the specified pivot length
Designed for educational and analytical purposes, not as a signal generator
Elliott Wave analysis is subjective – this is my algorithmic interpretation
Works best on liquid markets with clear trend structure
Not financial advice – always do your own research
Re-publishing Notice
This indicator was previously blocked due to some house rule violations on my part. I've recently had time to review and fix those issues, and I'm now re-publishing a compliant version. Thanks for your patience!
Feedback Welcome
I'm still learning Elliott Wave theory myself, so if you spot any issues or have suggestions for improvement, please leave a comment. Let's learn together!
Happy trading! 📈
Overview
This indicator automatically detects Elliott Wave impulse patterns and diagonal formations on your chart. It analyzes price structure based on classic Elliott Wave rules and displays wave counts with confidence scores, Fibonacci projections, and invalidation levels.
Why I Built This
After reading Glenn Neely's book on Elliott Wave theory, I wanted to put my learning into practice by building something tangible. There's no better way to understand a concept than trying to code it!
I'll be honest – corrective wave patterns (zigzags, flats, triangles, combinations) were simply too complex for me to implement reliably. So instead, I focused on what I could manage: impulse waves and diagonal patterns. Maybe someday I'll tackle the corrections, but for now, this is my humble contribution.
The retracement visualization style was inspired by LuxAlgo's elegant approach – credit where credit is due!
How It Works
1. Wave Detection
The indicator uses pivot points to identify potential 5-wave structures:
WaveRuleWave 2Cannot retrace more than 100% of Wave 1Wave 3Cannot be the shortest among Waves 1, 3, 5Wave 4Should not overlap Wave 1 territory (impulse)Wave 5Completes the motive structure
2. Pattern Types
Impulse Waves
Classic 5-wave motive structure
Wave 3 typically extends (≥1.618 of Wave 1)
Strict mode enforces all Elliott rules
Diagonal Patterns
Ending diagonal (wedge-shaped)
Waves progressively contract
Lines 1-3 and 2-4 converge to an apex
Often signals trend exhaustion
3. Confidence Scoring
Each pattern receives a confidence score (0-100%) based on:
Fibonacci ratio adherence
Wave proportion relationships
Rule compliance
Structural clarity
Only patterns exceeding your threshold (default: 60%) are displayed.
4. Fibonacci Projections
After Wave 5 completion, the indicator projects potential retracement levels:
0.382, 0.500, 0.618, 0.786 of the entire impulse
5. Extension Channel
Connects Wave 0 origin to the retracement low, projecting:
0.618, 1.000, 1.272, 1.618 extensions
Optional extended levels: 2.000, 2.618, 4.236
6. Invalidation Levels
Shows the price level where the wave count becomes invalid – helping you know when your analysis is wrong.
Settings Explained
Impulse Wave Settings
Pivot Length: Sensitivity of wave detection (recommended: 5, 7, 14)
Strict Mode: Enforce all classic Elliott rules
Min Wave 3 Extension: Minimum ratio for Wave 3 (default: 1.618)
Diagonal Wave Settings
Allow Wave 4-1 Overlap: Required for valid diagonals
Extend Trendline: Project diagonal boundaries forward
Projection Settings
Fibonacci Levels: Customize retracement targets
Extension Bars: How far projections extend on chart
Pattern Management
Max Patterns: Limit displayed patterns to reduce clutter
Pattern Lifetime: Auto-remove old patterns after X bars
Use Cases
Trend Trading: Enter on Wave 3 or Wave 5 breakouts
Reversal Spotting: Diagonal completion often signals reversals
Target Setting: Use Fibonacci extensions for take-profit levels
Risk Management: Invalidation levels provide clear stop-loss references
Notes
This indicator uses pivot detection and may repaint – signals are confirmed after the specified pivot length
Designed for educational and analytical purposes, not as a signal generator
Elliott Wave analysis is subjective – this is my algorithmic interpretation
Works best on liquid markets with clear trend structure
Not financial advice – always do your own research
Re-publishing Notice
This indicator was previously blocked due to some house rule violations on my part. I've recently had time to review and fix those issues, and I'm now re-publishing a compliant version. Thanks for your patience!
Feedback Welcome
I'm still learning Elliott Wave theory myself, so if you spot any issues or have suggestions for improvement, please leave a comment. Let's learn together!
Happy trading! 📈
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.