OPEN-SOURCE SCRIPT
Smart Money Concepts Probability (Expo) Rit

Smart Money Concepts Probability (Expo) — v2
Overview
This indicator maps market structure using confirmed swing pivots and quantifies the follow-through of SMC events—CHoCH, SMS, and BMS—as real-time probabilities. It adds robust filters (ATR swing size, multi-timeframe bias) and statistically honest display (Laplace smoothing and Wilson confidence bands) to reduce noise and make the stats you see on the chart closer to what actually plays out.
How it works
Detects confirmed swing highs/lows with ta.pivothigh/ta.pivotlow.
Tracks a structure state machine: bias flips to CHoCH (±1), confirms to SMS (±2), then BMS/continuations (>|±2|).
Logs every transition as a success (continuation) or failure (reversion) and computes: Raw Win%, Laplace-smoothed probability, and Wilson confidence interval.
Draws Premium/Discount/Mid zones between the latest swing high/low and shows contextual probability labels at the extremes.
Filters & Upgrades
ATR swing filter: ignores tiny breaks; only counts pivots that exceed a user-set multiple of ATR.
MTF bias gate: only allows bullish sequences when price is above an HTF moving average (and vice-versa).
Label throttle: minimum bar spacing between plotted events to keep charts readable.
Response vs. Period: choose short-term or long-term structure resolution.
Outputs & Visuals
On-chart labels/lines for CHoCH/SMS/BMS (bull/bear colors).
Top-right table with Wins, Losses, Profitability, Laplace p̂, and Wilson CI (with sample-size guard).
Probability labels near current Up/Dn extremes.
Optional alerts containing ticker, timeframe, and the current probability summary.
Using the stats
Profitability = all-time raw follow-through rate.
Laplace p̂ stabilizes small-N swings.
Wilson CI shows a conservative range; the lower bound is a practical “floor.”
For best results, align entries with MTF bias, ensure swings pass the ATR filter, and favor entries in Discount (for longs) / Premium (for shorts) when the structure agrees.
Notes
This is an analytical tool, not a signal service. Always validate on your markets/timeframes and combine with risk management.
Overview
This indicator maps market structure using confirmed swing pivots and quantifies the follow-through of SMC events—CHoCH, SMS, and BMS—as real-time probabilities. It adds robust filters (ATR swing size, multi-timeframe bias) and statistically honest display (Laplace smoothing and Wilson confidence bands) to reduce noise and make the stats you see on the chart closer to what actually plays out.
How it works
Detects confirmed swing highs/lows with ta.pivothigh/ta.pivotlow.
Tracks a structure state machine: bias flips to CHoCH (±1), confirms to SMS (±2), then BMS/continuations (>|±2|).
Logs every transition as a success (continuation) or failure (reversion) and computes: Raw Win%, Laplace-smoothed probability, and Wilson confidence interval.
Draws Premium/Discount/Mid zones between the latest swing high/low and shows contextual probability labels at the extremes.
Filters & Upgrades
ATR swing filter: ignores tiny breaks; only counts pivots that exceed a user-set multiple of ATR.
MTF bias gate: only allows bullish sequences when price is above an HTF moving average (and vice-versa).
Label throttle: minimum bar spacing between plotted events to keep charts readable.
Response vs. Period: choose short-term or long-term structure resolution.
Outputs & Visuals
On-chart labels/lines for CHoCH/SMS/BMS (bull/bear colors).
Top-right table with Wins, Losses, Profitability, Laplace p̂, and Wilson CI (with sample-size guard).
Probability labels near current Up/Dn extremes.
Optional alerts containing ticker, timeframe, and the current probability summary.
Using the stats
Profitability = all-time raw follow-through rate.
Laplace p̂ stabilizes small-N swings.
Wilson CI shows a conservative range; the lower bound is a practical “floor.”
For best results, align entries with MTF bias, ensure swings pass the ATR filter, and favor entries in Discount (for longs) / Premium (for shorts) when the structure agrees.
Notes
This is an analytical tool, not a signal service. Always validate on your markets/timeframes and combine with risk management.
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。