OPEN-SOURCE SCRIPT
Updated

Math by Thomas - SMC Structure Toolkit – OB + FVG + CHoCH/BoS

2 243
📌 Description:
A complete Smart Money Concepts (SMC) market structure toolkit designed to help traders identify high-probability institutional activity using fractals, order blocks, fair value gaps, and structure shifts.

This tool combines several key SMC components to provide clear, actionable insights for both trend continuation and reversals.

🛠 Key Features:
✅ Order Blocks (OBs): Detected using fractal swing highs/lows, optional high volume & displacement candle filters

✅ Midline OB Visuals: Optional dashed lines drawn through the midpoint of each OB

✅ Fair Value Gaps (FVGs): Auto-detected based on classic gap criteria

✅ CHoCH & BoS Labeling: Real-time swing structure labeling with trend tracking

✅ Premium/Discount Zones: Highlighted zones for optimal entries in trending environments

✅ User Toggles: Turn OBs, FVGs, or midlines on/off for a cleaner chart

📈 How to Use:
Apply the indicator to your chart (best on 15m, 1h, or higher)

Enable/disable features in the settings panel:

Order Blocks: Use with displacement & high volume filters for cleaner setups

FVGs: Spot imbalances between price and liquidity

Structure Labels: Follow BoS/CHoCH signals to track trend changes

Look for:

CHoCH ➝ potential trend reversal

BoS ➝ trend continuation confirmation

OBs within discount/premium zones ➝ high-RR trade setups

Combine with your existing SMC or supply/demand approach

🧪 Best Timeframes:
Recommended: 15m, 1h, 4h, Daily

Works on any timeframe but more reliable with higher volume context

✍️ Notes:
Built using fractal logic and volume filters for cleaner signals

Designed to complement SMC strategies, not replace analysis
Release Notes
📄 Update Description for TradingView
🔧 Performance Optimized & Bug Fixed

Reduced Box Extension from 500 → 250 bars to prevent runtime errors

Fixed NA type assignment and fractalOffset scope issues

Improved structure logic for clearer CHoCH/BoS labeling

This update ensures smoother performance, especially on lower timeframes, while maintaining the full functionality of the Smart Money Concepts toolkit.
Release Notes
🆕 Update Notes – SMC Structure Toolkit
Version: 18th June 2025 Update
Author: Math by Thomas

What's New:

🔹 Fractal Customization Added
– You can now choose between 3-candle or 5-candle fractals for structure detection.
– This affects swing high/low detection used in:
 • Order Block (OB) identification
 • CHoCH / BoS labels
 • Structure line drawing
– The option is available under the "Structure Lines" settings group.

✅ This improvement allows users to fine-tune structural sensitivity based on their trading timeframe or preference.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.