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提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。