OPEN-SOURCE SCRIPT
Harmonic Pulse | XABCD Fibonacci Pattern Strategy

Harmonic Pulse scans zigzag swing pivots for the four classic Fibonacci harmonic patterns — Gartley, Bat, Butterfly, and Crab — and trades the reversal expected at the D-point completion. Rather than eyeballing X-A-B-C-D on the chart, it measures the AB/XA, BC/AB, CD/BC, and XD/XA leg ratios against each pattern's textbook Fibonacci targets and enters when enough of them line up, with a stop beyond the X point and a fixed reward:risk target.
Features
Tips
Warnings
Features
- Pivot-based zigzag (adjustable Pivot Length) drives the whole pattern search
- Detects Gartley, Bat, Butterfly, and Crab — toggle any pattern on/off individually
- Partial-match scoring: choose how many of the 4 ratios must align (2–4) to fire a trade, instead of an all-or-nothing match
- Adjustable Ratio Tolerance to control how strictly price has to hit each Fibonacci level
- ATR-based stop beyond the X point, fixed Reward:Risk target
- Trade direction filter (Both / Long Only / Short Only) and cooldown between entries
- Every matched pattern is drawn on the chart (X-A-B-C-D lines) with its match score and key ratios labeled
- Plain zigzag pivot markers, independent of pattern matching, for a quick visual sanity check
- Live status readout: pivots stored, patterns found, open and closed trade counts
Tips
- Start on the Daily timeframe on liquid, volatile large caps (NVDA, TSLA, AMD, SPY) — harmonic trading is a swing-timeframe approach and needs room for real structure to form
- If nothing's triggering, watch the zigzag pivot markers first — if those aren't appearing, it's a chart/history issue, not a pattern-matching issue
- Treat Ratio Tolerance and Minimum Matching Ratios as a linked pair: loosen both together for more trades, tighten both together for higher-conviction ones
- Disable patterns you don't want to trade (e.g. turn off Crab if you only trust the tighter Gartley/Bat completions) rather than leaving all four on by default
- Backtest across multiple symbols and date ranges before trusting any single result — harmonic setups are infrequent, so one chart's backtest is a small sample
Warnings
- Pivot confirmation is inherently backward-looking — a pattern only confirms Pivot Length bars after the actual turn, so live behavior will lag what you see in a backtest
- Harmonic pattern trading is a discretionary, pattern-recognition approach without a rigorous statistical basis — treat this as a structured way to find candidate setups, not a proven edge
- Loosening Ratio Tolerance or lowering Minimum Matching Ratios increases trade frequency but degrades how closely price actually respects the pattern — more trades isn't automatically better
- Backtest results don't include realistic slippage on stops/gaps through targets; verify these assumptions before considering live use
- Not financial advice — this is a tool for research and idea generation, not a signal to act on directly
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.