INVITE-ONLY SCRIPT
已更新 Market Structure [PRO][keypoems] - 100% rewritten engine

Market Structure [PRO] [keypoems] — 100% rewritten engine
Successor to my earlier script Supply and Demand Areas Responsible and Origins [PRO]. This version rebuilds the engine from scratch and adds HTF support, tap tracking, dealing ranges (“expansion legs”), and DB/DT pattern logic.
What it draws
HTF support
Choose a higher timeframe in the Timeframe input to compute market structure on HTF while viewing a lower‑timeframe chart. The script uses request.security and only confirms using closed HTF candles, so zones, BOS/MSS, mitigations and taps match the native HTF chart.
How it works (brief)
Notes
Successor to my earlier script Supply and Demand Areas Responsible and Origins [PRO]. This version rebuilds the engine from scratch and adds HTF support, tap tracking, dealing ranges (“expansion legs”), and DB/DT pattern logic.
What it draws
- Market‑structure zones built from protected high/low and confirmed BOS/MSS. Zones extend forward and remain on chart until 50% mitigation is wicked. Optional 30/50/70 levels.
- Protected High/Low lines and Continuation High/Low levels; BOS and MSS lines are plotted at confirmation.
- SNDR (Supply & Demand Responsible) areas for the counter‑trend swing that caused the BOS. The engine auto‑pivots (tries 3‑pivot then 1‑pivot) and extends each SNDR until 100% mitigation. First‑tap and second‑tap states are tracked and visually marked.
- Zone Tap detection: when price first enters an unmitigated zone, leaves it, and then violates a continuation level, the script confirms the tap and draws a horizontal TAP line from the tap swing for future retests.
- Dealing Ranges (Expansion legs): created on BOS→MSS flips or opposite‑direction MSS. Each range is anchored at the protected level, tracks the current extreme, and marks 50% mitigation. A diagonal arrow plus a 50% line show live progress. An optional right‑hand visual stacks all unmitigated ranges as compact boxes with their 50% line.
- Double Bottom / Double Top patterns: search starts at BOS/MSS events, confirms on neckline break, and draws an ATR‑buffered box and an extending neckline.
- Valid pullback labels and candidate confirmation lines help verify swing sequence formation.
HTF support
Choose a higher timeframe in the Timeframe input to compute market structure on HTF while viewing a lower‑timeframe chart. The script uses request.security and only confirms using closed HTF candles, so zones, BOS/MSS, mitigations and taps match the native HTF chart.
How it works (brief)
- Builds an alternating sequence of valid swings, tracks protected levels, and creates a zone on BOS; zones close or roll when MSS occurs.
- Zone mitigation = wick through the zone’s 50%. SNDR mitigation = full breach (100%).
- Tap logic requires: entry into the zone → exit → violation of a relevant continuation level; only then the TAP line is drawn.
- Dealing ranges start from the protected level at BOS→MSS (or opposite MSS), track the current extreme, and flag mitigation at 50%.
- DB/DT confirms only after a close through the neckline.
Notes
- Origins from the prior script have not been ported to this engine yet.
- Includes a performance switch (scan all zones vs. a recent subset) and an optional on‑chart debug table.
- Visual tool for price‑action study; not a strategy and not financial advice.
版本注释
Changelog v1.0a- Indicator is APPROVED and generally available via bundle!
- Ported Alerts for: 50% Zone Mitigation, Zone creation, SNDR 1-tap and 2-taps.
仅限邀请脚本
只有经作者批准的用户才能访问此脚本。您需要申请并获得使用权限。该权限通常在付款后授予。如需了解更多详情,请按照以下作者的说明操作,或直接联系keypoems。
除非您完全信任其作者并了解脚本的工作原理,否則TradingView不建议您付费或使用脚本。您还可以在我们的社区脚本中找到免费的开源替代方案。
作者的说明
Indicator is now generally available via web shop at: https://whop.com/keypoems/?a=keypoems
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
仅限邀请脚本
只有经作者批准的用户才能访问此脚本。您需要申请并获得使用权限。该权限通常在付款后授予。如需了解更多详情,请按照以下作者的说明操作,或直接联系keypoems。
除非您完全信任其作者并了解脚本的工作原理,否則TradingView不建议您付费或使用脚本。您还可以在我们的社区脚本中找到免费的开源替代方案。
作者的说明
Indicator is now generally available via web shop at: https://whop.com/keypoems/?a=keypoems
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。