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.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.