Pipsgrowth EX15021 SMC-OrderBlock
MT5 Expert Advisor (Open Source) · XAUUSD · M5, H1
Pipsgrowth.com EX15021 ICT4 — ICT scalper with BOS/CHoCH/FVG/OB/OTE and multi-confirmation, full 12-layer stack.
Overview
Pipsgrowth EX15021 SMC-OrderBlock is a discretionary-grade ICT scalper that tries to replicate the order-flow playbook most retail traders draw by hand: track where market structure is breaking, find where the sweep ran, and enter only when the retrace lands inside an Order Block, a Fair Value Gap, or an Optimal Trade Entry zone during London or New York. The EA version 2.00 is written around 12 named layers (REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester) and is built for XAUUSD on M5 with optional support for FX majors on M5–H1, magic 22215021.
The REGIME and SIGNAL layer is the most visible part of the engine. On every tick the EA walks five independent ICT concepts in a fixed order: CheckMarketStructure detects Break of Structure by comparing the closed bar's high/low to the stored prior swing high/low, and any directional flip of the last BOS additionally registers as a Change of Character arrow. CheckLiquiditySweep uses iHighest/iLowest over a 10-bar lookback to mark the last swing extremes, then flags a buy-side sweep if the closed bar's high exceeds the swing high and a sell-side sweep if the low undercuts the swing low. The sweep flag stays valid for 5 bars (sweepValidBars = 5), then auto-expires so the EA does not chase a level that is no longer fresh. CheckFairValueGap stores the last 5 unfilled gaps in a ring buffer; bullish FVG fires when the previous bar's low sits above the bar before that one's high, bearish FVG is the mirror, and any gap is marked filled the moment price trades inside the rectangle (the FVG color turns dark gray). CheckOrderBlock turns the last opposing candle into a stored OB (down-candle = bullish OB, up-candle = bearish OB), draws the rectangle, and flips the OB to mitigated if price closes beyond its far edge. CheckOTE scans the last 20 closed bars for the highest high and lowest low, classifies the impulse direction, and projects the Optimal Trade Entry band between 50% and 61.8% of the impulse move (configurable via Inp_OTE_FibLevel1=0.5 and Inp_OTE_FibLevel2=0.618).
The ENTRY layer only opens a position when at least two of those five ICT concepts align in the same direction, controlled by the Inp_RequireMultiConfirm=true input (the threshold falls to 1 if you switch the input off). The CONFIRM layer sits on top and lets the trader bolt on classical indicators: ConfirmEMA uses an EMA(Inp_EMAPeriod=50) and requires price above for buys or below for sells, ConfirmRSI uses RSI(14) with buy/sell thresholds defaulting to 50, ConfirmVolumeSpike compares the current bar's tick volume to a 20-bar average and only fires above 2.0x, ConfirmGaussian uses an Adaptive Moving Average iAMA(20, 2, 30, 2) and checks the slope, and ConfirmSMT reads RSI(14) on two user-defined symbols (Inp_SMT_Asset1=EURUSD, Inp_SMT_Asset2=GBPUSD) and looks for a bullish divergence (asset1 higher low, asset2 lower low) or bearish mirror. Each filter only contributes when its enable input is set; CalculateSignalStrength then converts the count into a 0–100% score that must clear Inp_MinSignalStrength=70% before ManageTrades fires. All five of EMA, RSI, Volume, Gaussian, SMT default to off, so the EA will trade ICT-pure out of the box and let the trader layer filters on as confidence grows.
The NO-TRADE layer combines four guards. Inp_EnableKillzone=true restricts entries to a parsed time window: London defaults to 08:00–10:00 server time and New York to 13:30–16:00, both parsed by ParseTimeToMinutes. Inp_EnableNewsFilter is wired to a stub IsNewsTime() that always returns false (the source comment notes that economic calendar data is not available on the platform), so the news gate is a no-op unless you replace the function. The EA's own daily P&L counters in g_TodayWins and g_TodayLosses are reset by ResetDailyCounters() whenever the date rolls over, and the engine refuses to open a new trade once either counter hits Inp_MaxDailyWins=3 or Inp_MaxDailyLosses=3, or once g_OpenTrades reaches Inp_MaxSimultaneousTrades=2. Inp_AllowMultipleEntries=false means the EA will not stack a second trade in the same direction while the first is still alive unless you turn that input on.
The RISK and SIZING layers offer two modes. Set Inp_RiskPercent to 0 and the EA sends a fixed Inp_FixedLotSize=0.10 lot on every entry. Leave it at the default 1.0% and CalculateLotSize() reads account balance, multiplies by 1%, divides by the per-pip cost implied by Inp_StopLossPips and the symbol's tick value/size/contract size, then clamps to the broker's volume step, minimum, and maximum. SL and TP are decided in CalculateSLTP. By default the EA places a 10-pip stop and 20-pip target (Inp_StopLossPips=10, Inp_TakeProfitPips=20, a 1:2 reward-to-risk ratio), but flipping Inp_UseATRDynamicSLTP=true swaps those for ATR(Inp_ATRPeriod=14) × Inp_ATR_SL_Mult=1.5 and ATR × Inp_ATR_TP_Mult=2.0, keeping the 1.33 RR while letting the brackets breathe with volatility. The MANAGE layer is two optional modules. Inp_EnableBreakeven with Inp_BreakevenAfterPips=5 moves the stop to entry once price has travelled 5 pips in profit, and Inp_EnableTrailingStop with Inp_TrailingStartPips=8 plus Inp_TrailingStepPips=2 ratchets the trailing stop in 2-pip steps once the trade is 8 pips in profit. Both default to off because ICT setups are usually run with the bracket untouched until the OTE target is hit.
The EXIT layer has three components. CheckEarlyExit closes any open position that contradicts the latest market structure (a buy is force-closed when g_MarketStruct flips to MS_Bearish, a sell when it flips to MS_Bullish), which prevents a position from surviving a CHoCH. ExitOldTrades reads Inp_MaxBarsInTrade=20 and force-closes anything older than 20 bars using a market order with deviation=10. ManageBreakevenAndTrailing, when enabled, runs on every tick after the ENTRY block. The SCALING layer is intentionally minimal: Inp_AllowMultipleEntries=false is the default, so the EA is single-position per direction. OnTester is exposed via CustomOptimizationStats(), which prints a success-rate and profit-factor readout at OnDeinit if Inp_CustomOptimization=true is set. The OnTradeTransaction handler listens for TRADE_TRANSACTION_DEAL_ADD with DEAL_ENTRY_OUT, reads the deal's profit, and increments g_TodayWins or g_TodayLosses; the UpdatePositionCount helper runs in lockstep so g_OpenTrades always reflects live exposure.
The VISUALS layer is unusually rich. DrawBOSArrow and DrawCHoCHArrow paint wingdings-coded arrows on the bar where each break or change was detected. DrawLiquiditySweep marks buy-side sweeps with a blue triangle above the candle and sell-side sweeps with a magenta triangle below. DrawFVGRect renders the most recent gaps as semi-transparent filled rectangles (green for bullish, crimson for bearish) and darkens them when they are filled. DrawOrderBlockRect draws a DodgerBlue box for bullish OBs and SandyBrown for bearish OBs, dotted and grayed on mitigation. DrawOTEZone projects the 50–61.8% retracement band as a dotted GreenYellow (buy) or Salmon (sell) rectangle projected 20 bars into the future. DrawKillzoneBackground paints the London window in AliceBlue and the New York window in MistyRose. UpdateDashboard, gated by Inp_ShowDashboard=true, prints an on-chart panel listing the session, current market structure, the BUY/SELL/NONE status of each of BOS, OB, FVG, OTE, and liquidity, which confirmations are wired in, the killzone flag, the open trade count, the daily wins/losses, and the live signal strength score.
A few honest caveats from the source. Three retry helpers (TryClose_EX15021, TryClosePartial_EX15021, TryModify_EX15021) sit at the bottom of the file and use the CTrade wrapper g_trade_wrappers_EX15021 with 3-attempt loops and 200 ms / 100 ms backoff on REQUOTE/TIMEOUT/PRICE_OFF/PRICE_CHANGED, but the live execution path in OpenTrade, CheckEarlyExit, ExitOldTrades, and ModifyPositionSL still calls OrderSend directly with ORDER_FILLING_IOC, so the retry helpers are defined but not wired. The news filter is a stub that never blocks. The header lists the EA as suggested for FX majors, Gold/Metals with M5 as the recommended timeframe, and the Strategy Tester inputs in MT5 are intentionally minimal — most of the visual layer and the SMT cross-asset check do not affect the backtest because they only draw on the chart or compare two external symbols. Use a broker with IOC or IOC-compatible filling, run it on a server whose clock is set to your preferred killzone timezone (most ECN brokers are GMT+2 or GMT+3), and expect the EA to fire on M5 setups at the 0:00/50:00 candle boundaries. The default 0.10 fixed-lot / 1% risk-percent / 1:2 RR profile behaves like a textbook ICT scalper: a few trades per London open, a few per NY open, and the dashboard telling you in real time which concept is currently aligned.
Strategy Deep Dive
Each tick, Pipsgrowth EX15021 walks five ICT detectors in fixed order: CheckMarketStructure marks BOS and CHoCH from the prior swing high/low, CheckLiquiditySweep tags buy-side and sell-side sweeps against a 10-bar swing window with a 5-bar validity window, CheckFairValueGap stores the last 5 unfilled gaps and retests them, CheckOrderBlock renders and tracks mitigation of the last opposing candle, and CheckOTE projects the 50–61.8% retracement band from the most recent impulse. ManageTrades then counts how many of those five concepts point the same way, requires at least 2 (configurable to 1), and only proceeds if the killzone parser returns London or New York and the daily P&L counters are not yet capped at 3 wins or 3 losses. If the five optional classical filters (EMA 50, RSI 14, volume spike 2x over 20-bar average, AMA slope, and RSI-divergence SMT across two user-defined symbols) are switched on, CalculateSignalStrength converts the hit count into a 0–100% score that must clear 70% before OpenTrade sends an IOC market order. ManageBreakevenAndTrailing and CheckEarlyExit run on every tick after the entry block: a structure flip force-closes any opposing position, ExitOldTrades force-closes anything past 20 bars, and the breakeven/trailing modules (both off by default) move the SL when the input thresholds are met.
Pipsgrowth EX15021 enters long when at least two of the five ICT concepts align bullish (BOS up, bullish Order Block retest, bullish FVG retracement, OTE buy band, or sell-side liquidity sweep valid within 5 bars) AND the killzone check returns London or New York, AND the live signal-strength score from any enabled confirmation filters (EMA 50, RSI 14, volume spike, Gaussian/AMA slope, or SMT divergence) clears the 70% minimum. The reverse conditions drive shorts. Trades only fire during the parsed London (08:00–10:00) and New York (13:30–16:00) killzone windows by default, and the EA refuses to act if daily wins/losses have already hit 3 or if two positions are already open.
Pipsgrowth EX15021 exits via three independent paths: a fixed 20-pip take-profit (or 2× ATR(14) when ATR mode is on), a fixed 10-pip stop-loss (or 1.5× ATR(14) when ATR mode is on), and the CheckEarlyExit routine that force-closes any open position the moment market structure flips against it (a buy is closed on MS_Bearish, a sell on MS_Bullish). ExitOldTrades adds a time-stop by closing anything older than 20 bars (Inp_MaxBarsInTrade=20), and optional breakeven/trailing modules move the stop to break-even at +5 pips and ratchet it in 2-pip steps once the trade is +8 pips in profit. The OnTradeTransaction handler tracks DEAL_ENTRY_OUT deals to update the daily wins/losses counter that caps new entries at 3 each.
Default stop is 10 pips per trade from entry, set in CalculateSLTP from the Inp_StopLossPips=10 input. Toggle Inp_UseATRDynamicSLTP=true to switch to ATR(14) × 1.5 for the SL, which lets the stop breathe with current volatility. Optional Inp_EnableBreakeven moves the SL to entry once price has moved 5 pips in favor, and Inp_EnableTrailingStop ratchets the SL in 2-pip increments after +8 pips of profit.
Default take-profit is 20 pips, set from Inp_TakeProfitPips=20 in CalculateSLTP, giving a 1:2 reward-to-risk ratio against the default 10-pip stop. Toggle Inp_UseATRDynamicSLTP=true to use ATR(14) × 2.0 for the TP target (≈1:1.33 RR). No basket-TP, no scaling-out, and no partial close is implemented in the live order path; positions reach the static TP or the fixed SL on the broker side.
Pipsgrowth EX15021 is built for a $100 minimum-balance ECN or RAW-spread account on XAUUSD M5 (with M15/H1 also viable), with the broker's server clock set so the default killzone windows (London 08:00–10:00, New York 13:30–16:00) line up with the actual FX-session liquidity. The 0.10 fixed-lot / 1% risk default behaves like a textbook ICT scalper — a handful of trades per London open and a handful per NY open, each blocked outside the killzone, capped at 3 daily wins and 3 daily losses, and limited to 2 simultaneous positions. The 10-pip SL × 20-pip TP grid (1:2 RR) fits low-spread gold brokers; switch the SL/TP to ATR(14) × 1.5/2.0 via Inp_UseATRDynamicSLTP if you run it on FX majors where volatility is calmer. Leave the EMA/RSI/Volume/Gaussian/SMT filters off for an ICT-pure setup, or layer them on once you have validated the engine on demo.
Strategy Logic
Pipsgrowth EX15021 SMC-OrderBlock — Strategy Logic Analysis (from .mq5 source)
Family: SMC-OrderBlock
Magic: 22215021
Version: 2.00
BRIEF:
ICT scalping EA implementing BOS/CHoCH, liquidity sweeps, fair value gaps, order blocks, killzone sessions, OTE entries with multi-confirmation, EMA/RSI/volume filters and SMT div. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester
INDICATOR STACK:
- Standard
MT5indicators
KEY FUNCTIONS:
CheckMarketStructure()DrawBOSArrow()DrawCHoCHArrow()UpdateSwingPoints()CheckLiquiditySweep()DrawLiquiditySweep()CheckFairValueGap()CheckFVGRetracement()IsBullishFVGRetracement()CheckOrderBlockRetest()IsRetestingBullishOB()IsRetestingBearishOB()- ...and 35 more
INTERNAL CONSTANTS (0 total):
INPUT PARAMETERS (60 total across 8 groups):
- [=== General Settings ===] Inp_FixedLotSize =
0.1// Fixed Lot Size - [=== General Settings ===] Inp_RiskPercent =
1.0// Risk % per Trade - [=== General Settings ===]
InpMagicNumber=22215021// Magic Number - [=== General Settings ===]
InpTradeComment= "Psgrowth.com Expert_15021" // TradeComment - [=== General Settings ===] Inp_AllowBuy =
true// Allow Buy Trades - [=== General Settings ===] Inp_AllowSell =
true// Allow Sell Trades - [=== General Settings ===] Inp_MaxSimultaneousTrades = 2 // Max Simultaneous Trades
- [=== General Settings ===] Inp_MaxDailyWins = 3 // Max Daily Wins
- [=== General Settings ===] Inp_MaxDailyLosses = 3 // Max Daily Losses
- [=== General Settings ===] Inp_CustomOptimization =
false// Custom OptimizationFocus(Success Rate Priority) - [=== General Settings ===] Inp_RequireMultiConfirm =
true// Require MultipleICTConfirmations - [=== General Settings ===] Inp_AllowMultipleEntries =
false// Allow Multiple Entries in Same Direction - [=== General Settings ===] Inp_MinSignalStrength =
70.0// Min SignalStrength(%) - [=== Entry Condition Settings ===] Inp_EnableBOS_CHoCH =
true// EnableBOS/CHoCH Detection - [=== Entry Condition Settings ===] Inp_EnableLiquiditySweep =
true// Enable Liquidity Sweep Detection - [=== Entry Condition Settings ===] Inp_EnableFVG =
true// Enable Fair Value Gap Detection - [=== Entry Condition Settings ===] Inp_EnableOrderBlock =
true// Enable Order Block Detection - [=== Entry Condition Settings ===] Inp_EnableKillzone =
true// Enable Killzone Time Filter - [=== Killzone Settings ===] Inp_LondonStart = "08:00" // London Killzone Start
Time(HH:MM) - [=== Killzone Settings ===] Inp_LondonEnd = "10:00" // London Killzone End
Time(HH:MM) - [=== Killzone Settings ===] Inp_NYStart = "13:30" // New York Killzone Start
Time(HH:MM) - [=== Killzone Settings ===] Inp_NYEnd = "16:00" // New York Killzone End
Time(HH:MM) - [=== Confirmation Filters ===] Inp_EnableEMA =
false// EnableEMATrend Filter - [=== Confirmation Filters ===] Inp_EMAPeriod = 50 //
EMAPeriod - [=== Confirmation Filters ===] Inp_EnableRSI =
false// EnableRSIConfirmation - [=== Confirmation Filters ===] Inp_RSI_Period = 14 //
RSIPeriod - [=== Confirmation Filters ===] Inp_RSI_BuyThreshold =
50.0//RSIBuy Threshold - [=== Confirmation Filters ===] Inp_RSI_SellThreshold =
50.0//RSISell Threshold - [=== Confirmation Filters ===] Inp_EnableVolumeSpike =
false// Enable Volume Spike Filter - [=== Confirmation Filters ===] Inp_VolumeSpikeMultiplier =
2.0// Volume Spike Multiplier - [=== Confirmation Filters ===] Inp_EnableGaussian =
false// Enable Gaussian Filter Slope - [=== Confirmation Filters ===] Inp_GaussianSlopeThreshold =
0.0// Gaussian Slope Threshold - [=== Confirmation Filters ===] Inp_EnableSMT =
false// EnableSMTDivergence Confirmation - [=== Confirmation Filters ===] Inp_SMT_Asset1 = "
EURUSD" //SMTAsset 1 - [=== Confirmation Filters ===] Inp_SMT_Asset2 = "
GBPUSD" //SMTAsset 2 - [=== Trade Management ===] Inp_StopLossPips =
10.0// StopLoss(pips) - [=== Trade Management ===] Inp_TakeProfitPips =
20.0// TakeProfit(pips) - [=== Trade Management ===] Inp_UseATRDynamicSLTP =
false// UseATR-based Dynamic SL/TP - [=== Trade Management ===] Inp_ATRPeriod = 14 //
ATRPeriod - [=== Trade Management ===] Inp_ATR_SL_Mult =
1.5//ATRMultiplier for SL - [=== Trade Management ===] Inp_ATR_TP_Mult =
2.0//ATRMultiplier for TP - [=== Trade Management ===] Inp_EnableBreakeven =
false// Enable Breakeven Protection - [=== Trade Management ===] Inp_BreakevenAfterPips =
5.0// Activate BreakevenAfter(pips) - [=== Trade Management ===] Inp_EnableTrailingStop =
false// Enable Trailing Stop - [=== Trade Management ===] Inp_TrailingStartPips =
8.0// TrailingStart(pips) - [=== Trade Management ===] Inp_TrailingStepPips =
2.0// TrailingStep(pips) - [=== Trade Management ===] Inp_MaxBarsInTrade = 20 // Max Bars to Hold Trade
- [=== Visuals ===] Inp_ShowBOS =
true// ShowBOS/CHoCH Arrows - [=== Visuals ===] Inp_ShowFVG =
true// Show Fair Value Gaps - [=== Visuals ===] Inp_ShowOB =
true// Show Order Blocks - [=== Visuals ===] Inp_ShowLiquidity =
true// Show Liquidity Pools - [=== Visuals ===] Inp_ShowKillzones =
true// Show Killzones Background - [=== Visuals ===] Inp_ShowDashboard =
true// Show Dashboard Panel - [=== Visuals ===] Inp_ShowOTE =
true// ShowOTEZones - [=== News Filter ===] Inp_EnableNewsFilter =
false// Enable News Filter - [=== News Filter ===] Inp_MinutesBeforeNews = 15 // Minutes Before News to Pause Trading
- [=== News Filter ===] Inp_MinutesAfterNews = 10 // Minutes After News to Resume Trading
- [=== Advanced
ICTSettings ===] Inp_EnableOTE =true// Enable Optimal Trade Entry - [=== Advanced
ICTSettings ===] Inp_OTE_FibLevel1 =0.5//OTEFibonacci Level 1 (50%) - [=== Advanced
ICTSettings ===] Inp_OTE_FibLevel2 =0.618//OTEFibonacci Level 2 (61.8%)
// Pipsgrowth EX15021 SMC-OrderBlock — Execution Flow (from source analysis)
// Family: SMC-OrderBlock
// ICT scalping EA implementing BOS/CHoCH, liquidity sweeps, fair value gaps, order blocks, killzone sessions, OTE entries with multi-confirmation, EMA/RSI/volume filters and SMT div. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester
ON_INIT:
Create indicator handles: standard set
Initialize state variables
Detect broker GMT offset
ON_TICK:
1. Refresh indicator buffers (closed-bar shift=1)
2. Manage existing positions:
- Break-even check
- ATR trailing stop
- Profit lock ratchet
- Time-based exit
- Opposite-signal exit
3. If new bar:
a. ClassifyRegime() — ADX/ATR/BB regime detection
b. NoTradeGate() checks:
- Market open + session filter
- Spread limit
- Cooldown after loss
- Consecutive loss limit
- Kill switch
- Max drawdown
- Max concurrent positions
- Daily/weekly loss limits
c. GenerateSignal() — strategy-specific entry logic
d. CheckConfirm() — HTF alignment + R:R + ADX minimum
e. Calculate position size from risk %
f. Execute with retry logic
g. Mark bar to prevent duplicates
ON_TESTER:
Custom fitness = weighted(RecoveryFactor, ROI, ProfitFactor, TradeCount, Sharpe, Drawdown)Optimization Profile
How to Install This EA on MT5
- 1Download the .mq5 file using the button above
- 2Open MetaTrader 5 on your computer
- 3Click File → Open Data Folder in the top menu
- 4Navigate to MQL5 → Experts and paste the .mq5 file there
- 5In MT5, right-click Expert Advisors in the Navigator panel → Refresh
- 6Drag the EA onto a chart matching the recommended timeframe
- 7Configure parameters according to the table on this page
- 8Enable Allow Algo Trading and click OK
EA Parameters
| Parameter | Default | Description |
|---|---|---|
| Inp_FixedLotSize | 0.1 | Fixed Lot Size |
| Inp_RiskPercent | 1.0 | Risk % per Trade |
| InpMagicNumber | 22215021 | Magic Number |
| InpTradeComment | "Psgrowth.com Expert_15021" | Trade Comment |
| Inp_AllowBuy | true | Allow Buy Trades |
| Inp_AllowSell | true | Allow Sell Trades |
| Inp_MaxSimultaneousTrades | 2 | Max Simultaneous Trades |
| Inp_MaxDailyWins | 3 | Max Daily Wins |
| Inp_MaxDailyLosses | 3 | Max Daily Losses |
| Inp_CustomOptimization | false | Custom Optimization Focus (Success Rate Priority) |
| Inp_RequireMultiConfirm | true | Require Multiple ICT Confirmations |
| Inp_AllowMultipleEntries | false | Allow Multiple Entries in Same Direction |
| Inp_MinSignalStrength | 70.0 | Min Signal Strength (%) |
| Inp_EnableBOS_CHoCH | true | Enable BOS/CHoCH Detection |
| Inp_EnableLiquiditySweep | true | Enable Liquidity Sweep Detection |
| Inp_EnableFVG | true | Enable Fair Value Gap Detection |
| Inp_EnableOrderBlock | true | Enable Order Block Detection |
| Inp_EnableKillzone | true | Enable Killzone Time Filter |
| Inp_LondonStart | "08:00" | London Killzone Start Time (HH:MM) |
| Inp_LondonEnd | "10:00" | London Killzone End Time (HH:MM) |
| Inp_NYStart | "13:30" | New York Killzone Start Time (HH:MM) |
| Inp_NYEnd | "16:00" | New York Killzone End Time (HH:MM) |
| Inp_EnableEMA | false | Enable EMA Trend Filter |
| Inp_EMAPeriod | 50 | EMA Period |
| Inp_EnableRSI | false | Enable RSI Confirmation |
| Inp_RSI_Period | 14 | RSI Period |
| Inp_RSI_BuyThreshold | 50.0 | RSI Buy Threshold |
| Inp_RSI_SellThreshold | 50.0 | RSI Sell Threshold |
| Inp_EnableVolumeSpike | false | Enable Volume Spike Filter |
| Inp_VolumeSpikeMultiplier | 2.0 | Volume Spike Multiplier |
| Inp_EnableGaussian | false | Enable Gaussian Filter Slope |
| Inp_GaussianSlopeThreshold | 0.0 | Gaussian Slope Threshold |
| Inp_EnableSMT | false | Enable SMT Divergence Confirmation |
| Inp_SMT_Asset1 | "EURUSD" | SMT Asset 1 |
| Inp_SMT_Asset2 | "GBPUSD" | SMT Asset 2 |
| Inp_StopLossPips | 10.0 | Stop Loss (pips) |
| Inp_TakeProfitPips | 20.0 | Take Profit (pips) |
| Inp_UseATRDynamicSLTP | false | Use ATR-based Dynamic SL/TP |
| Inp_ATRPeriod | 14 | ATR Period |
| Inp_ATR_SL_Mult | 1.5 | ATR Multiplier for SL |
| Inp_ATR_TP_Mult | 2.0 | ATR Multiplier for TP |
| Inp_EnableBreakeven | false | Enable Breakeven Protection |
| Inp_BreakevenAfterPips | 5.0 | Activate Breakeven After (pips) |
| Inp_EnableTrailingStop | false | Enable Trailing Stop |
| Inp_TrailingStartPips | 8.0 | Trailing Start (pips) |
| Inp_TrailingStepPips | 2.0 | Trailing Step (pips) |
| Inp_MaxBarsInTrade | 20 | Max Bars to Hold Trade |
| Inp_ShowBOS | true | Show BOS/CHoCH Arrows |
| Inp_ShowFVG | true | Show Fair Value Gaps |
| Inp_ShowOB | true | Show Order Blocks |
| Inp_ShowLiquidity | true | Show Liquidity Pools |
| Inp_ShowKillzones | true | Show Killzones Background |
| Inp_ShowDashboard | true | Show Dashboard Panel |
| Inp_ShowOTE | true | Show OTE Zones |
| Inp_EnableNewsFilter | false | Enable News Filter |
| Inp_MinutesBeforeNews | 15 | Minutes Before News to Pause Trading |
| Inp_MinutesAfterNews | 10 | Minutes After News to Resume Trading |
| Inp_EnableOTE | true | Enable Optimal Trade Entry |
| Inp_OTE_FibLevel1 | 0.5 | OTE Fibonacci Level 1 (50%) |
| Inp_OTE_FibLevel2 | 0.618 | OTE Fibonacci Level 2 (61.8%) |
#property copyright "Pipsgrowth.com"
#property link "https://pipsgrowth.com"
#property version "2.00"
#property strict
#property description "Pipsgrowth.com EX15021 ICT4 — ICT scalper with BOS/CHoCH/FVG/OB/OTE and multi-confirmation, full 12-layer stack."
#include <Trade\Trade.mqh>
//--- ENUMS for Market Structure, Sessions, etc.
enum MarketStructure { MS_Bullish, MS_Bearish, MS_Neutral };
enum SessionType { SESSION_None, SESSION_London, SESSION_NewYork };
//--- INPUTS: General Settings
input group "=== General Settings ==="
input double Inp_FixedLotSize = 0.1; // Fixed Lot Size
input double Inp_RiskPercent = 1.0; // Risk % per Trade
input ulong InpMagicNumber = 22215021; // Magic Number
input string InpTradeComment = "Psgrowth.com Expert_15021"; // Trade Comment
input bool Inp_AllowBuy = true; // Allow Buy Trades
input bool Inp_AllowSell = true; // Allow Sell Trades
input int Inp_MaxSimultaneousTrades = 2; // Max Simultaneous Trades
input int Inp_MaxDailyWins = 3; // Max Daily Wins
input int Inp_MaxDailyLosses = 3; // Max Daily Losses
input bool Inp_CustomOptimization = false; // Custom Optimization Focus (Success Rate Priority)
input bool Inp_RequireMultiConfirm = true; // Require Multiple ICT Confirmations
input bool Inp_AllowMultipleEntries = false; // Allow Multiple Entries in Same Direction
input double Inp_MinSignalStrength = 70.0; // Min Signal Strength (%)
//--- INPUTS: Entry Condition Settings
input group "=== Entry Condition Settings ==="
input bool Inp_EnableBOS_CHoCH = true; // Enable BOS/CHoCH Detection
input bool Inp_EnableLiquiditySweep = true; // Enable Liquidity Sweep Detection
input bool Inp_EnableFVG = true; // Enable Fair Value Gap Detection
input bool Inp_EnableOrderBlock = true; // Enable Order Block Detection
input bool Inp_EnableKillzone = true; // Enable Killzone Time Filter
//--- INPUTS: Killzone Settings
input group "=== Killzone Settings ==="
input string Inp_LondonStart = "08:00"; // London Killzone Start Time (HH:MM)
input string Inp_LondonEnd = "10:00"; // London Killzone End Time (HH:MM)
input string Inp_NYStart = "13:30"; // New York Killzone Start Time (HH:MM)
input string Inp_NYEnd = "16:00"; // New York Killzone End Time (HH:MM)
//--- INPUTS: Confirmation Filters
input group "=== Confirmation Filters ==="
input bool Inp_EnableEMA = false; // Enable EMA Trend Filter
input int Inp_EMAPeriod = 50; // EMA Period
input bool Inp_EnableRSI = false; // Enable RSI Confirmation
input int Inp_RSI_Period = 14; // RSI Period
input double Inp_RSI_BuyThreshold = 50.0; // RSI Buy Threshold
input double Inp_RSI_SellThreshold = 50.0; // RSI Sell Threshold
input bool Inp_EnableVolumeSpike = false; // Enable Volume Spike Filter
input double Inp_VolumeSpikeMultiplier = 2.0; // Volume Spike Multiplier
input bool Inp_EnableGaussian = false; // Enable Gaussian Filter Slope
input double Inp_GaussianSlopeThreshold = 0.0; // Gaussian Slope Threshold
input bool Inp_EnableSMT = false; // Enable SMT Divergence Confirmation
input string Inp_SMT_Asset1 = "EURUSD"; // SMT Asset 1
input string Inp_SMT_Asset2 = "GBPUSD"; // SMT Asset 2
//--- INPUTS: Trade ManagementFull source code available on download
Educational purposes only. Do NOT use with real money. Test on demo accounts only.
Clear Warning: Educational Purposes Only
Clear Warning: This Expert Advisor is for educational and testing purposes only. Do NOT use it with real money. Test only on demo accounts. Trading with real money involves substantial risk of capital loss. This does not constitute investment advice.
Recommended Brokers for This EA
These EAs run on MT5 — use a regulated broker with fast execution and tight spreads
Markets.com
Exness
IC Markets
Similar Expert Advisors
View All Expert AdvisorsMore Other strategy EAs from our library
Pipsgrowth EX01007 Adaptive
Pipsgrowth.com EX01007 Adaptive XAUUSD 5M — multi-indicator signal scorer with regime filter, full 12-layer stack, configurable timeframe, trailing/BE/profit-lock toggles, pyramid gate, spread filter, new-bar gate, filling mode detection.
Pipsgrowth EX01019 Adaptive
Pipsgrowth.com EX01019 Self-Adaptive Market EA Fixed — multi-regime adaptive EA, full 12-layer stack.
Pipsgrowth EX15029 SMC-OrderBlock
Pipsgrowth.com EX15029 SMCBreakoutEA — SMC breakout CHOCH/liquidity sweep EA, full 12-layer stack.
Community
Educational purposes only. Do NOT use with real money. Test on demo accounts only.