OPEN-SOURCE SCRIPT
已更新

Math by Thomas - SMC OB + FVG

909
📄 Description
This script is designed for traders following the Smart Money Concepts (SMC) methodology. It automatically detects:

✅ Bullish and Bearish Order Blocks (OBs) based on structural breakouts, displacement, and volume conditions.

✅ Fair Value Gaps (FVGs) using a 3-candle price imbalance model.

🔄 Both OBs and FVGs clean up dynamically when invalidated by price action.

Built with institutional logic, this tool helps identify areas of interest for potential reversals, liquidity grabs, or mitigation plays.

⚙️ How It Works
🔷 Order Blocks (OB)
A Bullish OB is marked after a Break of Structure (BOS) to the upside.

A Bearish OB is marked after BOS to the downside.

Filters like displacement candle and volume spike can be toggled in settings.

Boxes are drawn from the opposing candle in the move, and will disappear once broken or expired.

🟥 Fair Value Gaps (FVG)
FVGs are detected when the middle candle leaves a price imbalance between the first and third candle.

Zones are marked with transparent boxes.

Labels (FVG) appear only once every 20 bars to reduce clutter.

Gaps are removed only after a full candle closes through the zone (conservative logic).

🛠️ User Settings
Choose volume multiplier and ATR period for OB displacement logic.

Set box extension, label transparency, and cleanup behavior.

Full control over colors and midline display.

📈 How to Use
Apply the indicator to any chart (works best on indices, forex, crypto).

Use OBs as points of interest for potential reaction zones or mitigation setups.

Use FVGs to identify imbalances that may attract price.

Watch for confluence between OBs and FVGs for high-probability entries.

📚 Best Practice
Use on 15m–1h timeframe for clean structure.

Align with higher TF bias for direction.

Combine with liquidity sweeps, EQH/EQL, or breaker blocks for refinement.

發行說明
### 🛠 Update Note – v1.1

**What's New:**

🔀 **Market Structure Toggle Added**
You can now choose between:
- ✅ **Structure-Based OBs**: OBs appear after a Break of Structure (BOS) for higher reliability.
- 🚀 **Immediate OBs**: OBs are marked right after displacement candles, without waiting for confirmation — perfect for scalping or early entries.

📌 Find this option under **Order Blocks → Use Market Structure** in the settings.

**Why This Matters:**
Structure-based OBs are more conservative, while immediate OBs give you faster insight into potential mitigation zones. Choose the style that fits your strategy!

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。