OPEN-SOURCE SCRIPT
Auto Harmonic Patterns [AFD]

A harmonic shape is a starting point—not the whole story.
Auto Harmonic Patterns maps the formation, its price zone and prior trend context, then keeps the pattern's status separate from the levels price has touched.
What it shows
- Twelve harmonic patterns in bullish and bearish shapes: Gartley, Bat, Alt Bat, Butterfly, Crab, Deep Crab, Cypher, Shark, Nen Star, 5-0, ABCD and Three Drives.
- A Potential Reversal Zone (PRZ): the outer range of the pattern's price projections, not necessarily their overlap or a prediction of reversal.
- A Setup marker when the checks pass: D inside the PRZ, the applicable X boundary, a confirming close off D without already leaving the D-to-C band and, when enabled, prior trend context. Setup describes those checks—not a trade recommendation. Non-Setup patterns can remain visible, but carry no Entry, Target or Stop levels.
- Grouped labels for formations sharing D, with individual details in hovers. The table separates formation Status from Reached level touches.
How to read it
The detector compares confirmed swing-leg ratios with defined pattern ranges and your Ratio tolerance. Swing strength controls pivot sensitivity; an optional larger swing reading adds another scale on the same chart timeframe. Prior trend can use swing structure or a moving average.
Standard/Detailed enable triangle fill; Minimal hides it. Custom unlocks preset-controlled switches; unused controls are greyed out. Triangle transparency defaults to 60%, adjustable from 0% solid to 100% invisible whenever fill is enabled; finished patterns lose their fill. PRZ and level-box shading are separate. Hover for ratios and checks. Family/orientation filters hide drawings, not detection or pattern/lifecycle alerts. Projected-zone alerts are opt-in and require a drawn zone; level touches do not generate alerts.
The timing matters
A completed pattern appears only after D confirms—the relevant swing-strength number of bars later—and is drawn back to its earlier pivots. It was not available at D in real time. Optional forming patterns and projected D zones can change or disappear before completion.
Levels and size are calculations, not outcomes
Entry references the rounded confirmation close; Targets and Stop follow your settings. R means the C-to-D pattern distance, optionally ATR-capped—not Entry-to-Stop risk. These levels are configured geometry, not measured performance. A touch is not a fill or a win/loss; when Target and Stop are touched within one bar, their order is unknown.
Optional sizing rounds down to whole units using the configured budget, displayed Entry-to-Stop distance and instrument point value. The budget must already be in the instrument's currency. No FX conversion, fees, slippage, fill modelling or combined-position exposure is included. Unsupported values show unavailable.
Use standard time-based bars or candles. Available history, search settings and tracking limits affect coverage; this is not an exhaustive historical pattern catalogue.
About this release
Free and open-source under MPL-2.0. Auction Foundry's implementation combines Setup qualification, shared-D label handling and separate formation/level tracking; it does not claim ownership of harmonic methods. Pattern definitions draw on published harmonic work, including Scott Carney and Darren Oglesbee; internal components come from Auction Foundry's Classical Auto Chart Patterns and Fibonacci Confluence.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
Auction Foundry - See the Auction more clearly.
All content provided is for informational & educational purposes only.
Website: auction-foundry.io
Instagram: instagram.com/AuctionFoundry
X:@AuctionFoundry
All content provided is for informational & educational purposes only.
Website: auction-foundry.io
Instagram: instagram.com/AuctionFoundry
X:@AuctionFoundry
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
Auction Foundry - See the Auction more clearly.
All content provided is for informational & educational purposes only.
Website: auction-foundry.io
Instagram: instagram.com/AuctionFoundry
X:@AuctionFoundry
All content provided is for informational & educational purposes only.
Website: auction-foundry.io
Instagram: instagram.com/AuctionFoundry
X:@AuctionFoundry
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。