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が提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。