OPEN-SOURCE SCRIPT
Multi-Module ICT Strategy Engine

# Multi-Module ICT/SMC Strategy Engine
### Executive Summary
The Multi-Module ICT Strategy Engine is a high-fidelity algorithmic trading framework built for Pine Script v6. It serves as a comprehensive all-in-one execution environment, integrating five distinct Institutional Order Flow (IOF) modules—ranging from Acceptance logic to Fair Value Gaps—into a single, cohesive strategy. By leveraging a strict 1:1 reward-to-risk ratio and ATR-based volatility targeting, the engine is designed to capture high-probability smart money movements while maintaining rigorous capital preservation.
---
### The Concept
The strategy is rooted in the philosophy of Market Structure and Liquidity Displacement. Rather than relying on lagging indicators, this engine uses price-action heuristics to identify where institutional participants are likely entering the market. It employs a multi-modular architecture that allows you to toggle specific behaviors—such as Swing Failure Patterns (SFP) or Fair Value Gaps (FVG)—to find the optimal confluence for any given asset. The core logic focuses on adaptive volatility, where stop-loss and take-profit levels are dynamically calculated using the Average True Range (ATR) to ensure the strategy breathes with the current market environment.
---
### Key Features
- Modular Architecture: Five independent modules (Acceptance/Rejection, SFP, HTF Liquidity, Displacement, and FVG) can be toggled on or off to customize the strategy's DNA.
- Volatility-Adjusted Risk: Uses a 14-period ATR multiplier to set precise, non-arbitrary SL and TP levels.
- HTF Liquidity Integration: Automatically tracks Previous Weekly Highs (PWH) and Lows (PWL) as liquidity magnets for institutional reversals.
- Dynamic Visual Dashboard: A real-time UI table displays module status, active FVG counts, and live winrate statistics directly on your chart.
- Automated FVG Management: Tracks up to 10 active Fair Value Gaps, including their 50% Consequent Encroachment (CE) levels, with automated expiry logic.
---
### Signal Logic
The engine generates signals based on the confluence of the following logic:
- Bullish Signal (+): Triggered when price fulfills module-specific criteria—such as a successful retest of broken resistance (M1), a sweep of the PWL followed by a bullish reaction (M3), or a pullback into a bullish FVG or Displacement zone (M4/M5).
- Bearish Signal (-): Triggered when price sweeps the PWH (M2), experiences a high-body-ratio displacement move below support (M4), or reaches the Consequent Encroachment of a bearish FVG (M5).
- Visual Cues: Entry points are marked by signal labels (M1–M5), while active zones are highlighted via dotted displacement boxes and solid FVG boxes with dashed midline CE levels.
---
### How to Use
1. Define Your Bias: Use Module 3’s Macro MA (EMA or SMA) to determine the overall trend direction.
2. Wait for Displacement: Look for Power Moves (Module 4) that break significant S/R levels with high body-to-range ratios.
3. Execute on Pullback: The engine is programmed to enter on the return to origin or the 50% CE of a gap rather than chasing the initial breakout.
4. Manage the Trade: The strategy employs a Single Order policy—it will not enter new trades if a position is already open, ensuring your capital is never over-leveraged.
---
### Technical Specifications
- Pine Script Version: v6.
- Timeframe: Optimized for Daily.
- Risk Model: Default 2% equity per trade with a 1:1 Reward-to-Risk ratio.
- Customizable Inputs:
- ATR Multiplier: Adjusts the tightness of the SL/TP.
- Acceptance Candles: Sets the number of bars required above/below a level to confirm a breakout.
- Displacement Thresholds: Customizable body-size and range ratios to filter out weak moves.
---
Disclaimer: This script is an educational tool for strategy development and backtesting. Always perform your own due diligence before deploying capital.
### Executive Summary
The Multi-Module ICT Strategy Engine is a high-fidelity algorithmic trading framework built for Pine Script v6. It serves as a comprehensive all-in-one execution environment, integrating five distinct Institutional Order Flow (IOF) modules—ranging from Acceptance logic to Fair Value Gaps—into a single, cohesive strategy. By leveraging a strict 1:1 reward-to-risk ratio and ATR-based volatility targeting, the engine is designed to capture high-probability smart money movements while maintaining rigorous capital preservation.
---
### The Concept
The strategy is rooted in the philosophy of Market Structure and Liquidity Displacement. Rather than relying on lagging indicators, this engine uses price-action heuristics to identify where institutional participants are likely entering the market. It employs a multi-modular architecture that allows you to toggle specific behaviors—such as Swing Failure Patterns (SFP) or Fair Value Gaps (FVG)—to find the optimal confluence for any given asset. The core logic focuses on adaptive volatility, where stop-loss and take-profit levels are dynamically calculated using the Average True Range (ATR) to ensure the strategy breathes with the current market environment.
---
### Key Features
- Modular Architecture: Five independent modules (Acceptance/Rejection, SFP, HTF Liquidity, Displacement, and FVG) can be toggled on or off to customize the strategy's DNA.
- Volatility-Adjusted Risk: Uses a 14-period ATR multiplier to set precise, non-arbitrary SL and TP levels.
- HTF Liquidity Integration: Automatically tracks Previous Weekly Highs (PWH) and Lows (PWL) as liquidity magnets for institutional reversals.
- Dynamic Visual Dashboard: A real-time UI table displays module status, active FVG counts, and live winrate statistics directly on your chart.
- Automated FVG Management: Tracks up to 10 active Fair Value Gaps, including their 50% Consequent Encroachment (CE) levels, with automated expiry logic.
---
### Signal Logic
The engine generates signals based on the confluence of the following logic:
- Bullish Signal (+): Triggered when price fulfills module-specific criteria—such as a successful retest of broken resistance (M1), a sweep of the PWL followed by a bullish reaction (M3), or a pullback into a bullish FVG or Displacement zone (M4/M5).
- Bearish Signal (-): Triggered when price sweeps the PWH (M2), experiences a high-body-ratio displacement move below support (M4), or reaches the Consequent Encroachment of a bearish FVG (M5).
- Visual Cues: Entry points are marked by signal labels (M1–M5), while active zones are highlighted via dotted displacement boxes and solid FVG boxes with dashed midline CE levels.
---
### How to Use
1. Define Your Bias: Use Module 3’s Macro MA (EMA or SMA) to determine the overall trend direction.
2. Wait for Displacement: Look for Power Moves (Module 4) that break significant S/R levels with high body-to-range ratios.
3. Execute on Pullback: The engine is programmed to enter on the return to origin or the 50% CE of a gap rather than chasing the initial breakout.
4. Manage the Trade: The strategy employs a Single Order policy—it will not enter new trades if a position is already open, ensuring your capital is never over-leveraged.
---
### Technical Specifications
- Pine Script Version: v6.
- Timeframe: Optimized for Daily.
- Risk Model: Default 2% equity per trade with a 1:1 Reward-to-Risk ratio.
- Customizable Inputs:
- ATR Multiplier: Adjusts the tightness of the SL/TP.
- Acceptance Candles: Sets the number of bars required above/below a level to confirm a breakout.
- Displacement Thresholds: Customizable body-size and range ratios to filter out weak moves.
---
Disclaimer: This script is an educational tool for strategy development and backtesting. Always perform your own due diligence before deploying capital.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.