P
PipsGrowth
OtherOpen Source – Free

Pipsgrowth EX15015 SMC-OrderBlock

MT5 Expert Advisor (Open Source) · XAUUSD · M5

Pipsgrowth.com EX15015 XAUUSD Liquidity Trap EA v3.3 — liquidity-zone scalper with pin-bar/RSI/DEMA confirmation, full 12-layer stack.

Overview

EX15015 (file: Pipsgrowth_com_EX15015_XAUUSD_Liquidity_Trap_EA_v3_3.mq5) is the v3.3 refresh of the EX15-family liquidity-trap scalper, and the new piece of logic in this build is the addition of a DEMA (Double Exponential Moving Average) crossover confirmation gate sitting on top of the engulfing, pin bar and RSI gates that already shipped in v3.1. So this is a 7-gate AND-confirmation strategy: 1 gate is always-on (price surge), 4 gates default-on (engulfing, pin bar, RSI, DEMA crossover) and 2 gates default-off (volume surge, higher-timeframe MA trend). All seven must read true before a buy or sell is fired. The brief in the file header — "Liquidity-trap scalper that detects swing-based liquidity zones, price surges and volume spikes, then enters on pin-bar / engulfing / RSI / DEMA-crossover confirmation with R:R SL/TP" — captures it exactly, including the twelve-layer claim of REGIME / SIGNAL / ENTRY / CONFIRM / NO-TRADE / CAPITAL CAP / RISK / SIZING / MANAGE / EXIT / SCALING / OnTester.

How a setup actually forms on the chart. IdentifySwingPoints walks the last ~20 bars and FindSwingHigh / FindSwingLow return the first index where high[i] strictly exceeds both high[i-barsEachSide] and high[i+barsEachSide] (mirrored for lows), with barsEachSide = SwingBarCount = 1 by default — so a true 3-bar fractal pivot. When a new swing is found and not already in the buffer, AddLiquidityZone stores the swing price plus the swing time, de-dups against existing zones at 0.3% proximity, and MarkLiquidityZone draws an OBJ_HLINE in clrCrimson (upper) or clrDodgerBlue (lower) with STYLE_DASH, named EA_LiqZone_Upper_ / EA_LiqZone_Lower_. Zones stay active for MaxZoneAge = 24 hours, and CleanupInactiveZones runs every 4 hours (TimeCurrent() % (3600*4) < 60) to free memory and remove the chart objects.

Once a zone exists, the buy path is CheckBuySignals, which iterates the lowerLiquidityZone array looking for the first zone where the current Ask is inside the 1% band [zoneLower, zoneLower * 1.01]. When that condition holds, all 7 confirmation functions get called and logged: CheckPriceSurge (MathMax of open-to-current percent over 10 bars and 5-bar high-low range, threshold PriceSurgePercent * 100 = 0.1% default), IsVolumeSurge (BYPASSED because RequireVolumeSurge = false by default), IsZoneConfirmedByHigherTimeframe (BYPASSED because UseHigherTimeframeConfirmation = false by default — falls through to a permissive true), IsBullishEngulfingPattern (3-bar lookback, current body engulfs prior opposite-color body), IsBullishPinBar (body/totalRange <= PinBarRatio = 0.3 AND lower shadow >= 2x body AND upper shadow <= 0.5x body), IsRSIOversold (rsiValues[0] <= RSIOversoldLevel = 30 from a 3-bar CopyBuffer) and IsDEMABullishCrossover (the v3.3 addition). Sell path is a mirror in CheckSellSignals with upper zones, bearish engulfing / shooting-star pin, RSI >= 70, and DEMA bearish crossover. After a successful fire the zone is deactivated (zoneActive[i] = false), so the same liquidity level can only trigger one trade per lifetime.

DEMA in this EA is not a native MQL5 indicator. CDEMAWrapper (lines 216-253) builds DEMA = 2 * EMA(length) - EMA(EMA(length)) by holding two iMA handles per wrapper: m_handleEMA and m_handleEMAofEMA. demaFast.Init(..., 8) and demaSlow.Init(..., 21) create both wrappers, and CopyBuffer reads the inner EMA first, the EMA-of-EMA second, then returns the DEMA buffer. The IsDEMABullishCrossover condition is intentionally loose: it returns true on a fresh crossover (fast[0] > slow[0] AND fast[1] <= slow[1]) OR whenever fast[0] > slow[0] — i.e., the fast DEMA is currently above the slow DEMA. That is more of a trend-alignment check than a strict crossover detector, and it makes the DEMA gate weaker than the engulfing / pin bar / RSI gates it sits next to. With DEMAFastPeriod = 8 and DEMASlowPeriod = 21, the wrapper reconstructs DEMA(8) and DEMA(21) on the trading timeframe, releasing both internal handles via demaFast.Release() / demaSlow.Release() in OnDeinit.

Sizing is fixed and non-risk-based. CalculatePositionSize(stopLossPoints) explicitly ignores the stopLossPoints argument and returns NormalizeLotSize(FixedLotSize), which is 0.01 by default and gets clamped to the symbol's minLot / maxLot / lotStep range. SL placement for a buy is zoneLower * (1 - 0.005) — half a percent past the zone on the downside — and TP is currentPrice + (currentPrice - stopLoss) * RewardToRiskRatio. With RewardToRiskRatio = 2.0 that is a clean 1:2 R:R regardless of how far price has run from the zone to entry. Sell path mirrors with stopLoss = zoneUpper * (1 + 0.005) and takeProfit = currentPrice - (stopLoss - currentPrice) * RewardToRiskRatio. Orders are sent via Trade.Buy / Trade.Sell with Trade.SetDeviationInPoints(10) for slippage, and a single position counts against MaxPositions = 5 per EA instance.

Trailing stop is now actually wired. ManageOpenPositions walks all open positions, applies the trailing only when EnableTrailingStop = true, and ApplyTrailingStop computes trailLevel = bid - currentProfit * TrailingStopPercent / 100 for buys and ask + currentProfit * TrailingStopPercent / 100 for sells (default 50% of profit, so half the open profit is locked once the trade is in green). Modify goes through TryModify_EX15015 (3 attempts, 100ms backoff on REQUOTE / TIMEOUT). That is a real improvement over the EX15013 cousin where ApplyTrailingStop was defined but not called. There is still no time-based exit, no opposite-signal close, and no partial close during the trade life — positions exit exclusively at the static SL or TP, or get ratcheted by the trailing.

Risk and session gates. The per-tick spread filter rejects the bar at spread > MaxSpreadPoints * point = 30 points (3 pips on a 5-digit XAUUSD quote). MaxConsecutiveLosses = 3 in UpdateTradeStatistics triggers pauseUntilTime = TimeCurrent() + PauseMinutes * 60 = 60 minutes, and the dashboard's Status line goes red for that window. EnableTimeFilter is OFF by default but accepts HH:MM strings (08:00-20:00 broker time when enabled). AvoidHighImpactNews = true is the default and IsHighImpactNewsTime is implemented as a hardcoded single event at 14:00 same day with NewsBufferMinutesBefore / After = 30, so unless you repopulate highImpactNewsTimes the news filter is functionally dormant. The 5-attempt progressive-delay retry in DetermineTrend (100ms, 200ms, 300ms, 400ms) and the 5x MapTimeframeInt redefinition in the source (lines 33, 56, 80, 115, 142 — code quality issue, not a logic bug) are inherited from the EX15 family.

Version-string inconsistency worth flagging. #property version says "2.00", the #property description line advertises "v3.3", the OnInit Print and OnDeinit Print say "v3.30", the UpdateDashboard title writes "XAUUSD Liquidity Trap EA v3.2", and the dashboard stat line uses the same v3.2 string. Treat the v3.3 description as authoritative for behavior because the 4 default-on gates match v3.3 in every other way. Magic 22215015, comment string Psgrowth.com Expert_15015, and slippage 10 points are the only stable identifiers across all five version labels.

What to expect when running it. On XAUUSD M30 with the 4 default-on gates, the EA will fire only when all of price surge >= 0.1%, an engulfing body covers the prior opposite body within 3 bars, a hammer / shooting-star pattern prints within 3 bars (PinBarRatio = 0.3), RSI(14) sits at the extreme (>= 70 for sells, <= 30 for buys), and DEMA(8) is at-or-above DEMA(21) for buys (or at-or-below for sells). That is a strict set of conditions and the trade frequency will be modest. With FixedLotSize = 0.01 and RewardToRiskRatio = 2.0, a winning streak of three R multiples yields 6% on a $1,000 account, a losing streak of three losses yields -3% before the 60-minute pause kicks in. Recommended setup: $100 minimum, ECN / RAW-spread broker with sub-30-point typical spread on XAUUSD, broker time set to GMT+2 or GMT+3, and keep UseDEMAConfirmation enabled — it is the v3.3 piece of the design and the simplest way to see whether the v3.3 vs v3.1 difference actually changes your trade log.

Strategy Deep Dive

On every new bar the EA calls IdentifySwingPoints, which scans the last 20 bars through FindSwingHigh / FindSwingLow to detect strict 3-bar fractals (SwingBarCount=1). New swing prices get pushed into upperLiquidityZone[] / lowerLiquidityZone[] with zone age tracking, de-duped at 0.3% proximity, and drawn as clrCrimson / clrDodgerBlue dashed horizontal lines. CheckBuySignals then walks the lower zones looking for the Ask inside [zoneLower, zoneLower1.01]; CheckSellSignals walks upper zones for the Bid inside [zoneUpper0.99, zoneUpper]. Inside the band the EA evaluates 7 conditions in this order: price surge (max of open-to-current% over 10 bars and 5-bar range%, threshold 0.1%), volume surge (1.5x of 20-bar CopyTickVolume avg — bypassed by default), HTF MA(20) vs MA(50) trend via DetermineTrend (bypassed by default), bullish/bearish engulfing (3-bar body engulfing), hammer/shooting-star pin (PinBarRatio 0.3, dominant shadow >= 2x body), RSI(14) <= 30 / >= 70, and DEMA(8) vs DEMA(21) where DEMA is reconstructed by CDEMAWrapper as 2*EMA - EMA(EMA) with two iMA handles per wrapper. The DEMA check is intentionally loose: it returns true on a fresh crossover OR whenever the fast DEMA is already on the correct side of the slow DEMA. On a full 7-gate hit, ExecuteBuyOrder / ExecuteSellOrder fires Trade.Buy / Trade.Sell at fixed FixedLotSize=0.01 with SL=zone*0.995/zone*1.005 and TP=entry + (entry - SL) * 2.0, then deactivates the zone. ManageOpenPositions applies ApplyTrailingStop on each tick when EnableTrailingStop=true, ratcheting the SL behind the price by 50% of the open profit, while UpdateTradeStatistics counts three consecutive losses and arms a 60-minute pause.

Entry Signal

Entries require price to be inside the 1% band of an active swing-derived liquidity zone [zoneLower, zoneLower1.01] for buys or [zoneUpper0.99, zoneUpper] for sells, then ALL of price surge >= 0.1% (PriceSurgePercent=0.001), AND-gated defaults-on: bullish engulfing within 3 bars, hammer pin (body/range<=0.3, lower shadow >= 2x body) within 3 bars, RSI(14) <= 30, and DEMA(8) above DEMA(21). Volume surge and HTF MA trend are bypassed by default. After firing, the zone is deactivated so it cannot trigger again.

Exit Signal

Positions exit exclusively at the static broker-side SL or TP, with optional trailing ratchet when EnableTrailingStop=true. ApplyTrailingStop locks TrailingStopPercent=50% of open profit once the trade is green, modified through TryModify_EX15015 (3 retries, 100ms backoff). There is no time-based exit and no opposite-signal close — the trailing is the only path to change the SL after entry.

Stop Loss

SL is broker-side static at zoneLower * (1 - 0.005) for buys and zoneUpper * (1 + 0.005) for sells (0.5% past the zone). Once a position is in profit, ApplyTrailingStop can ratchet the SL behind the price by TrailingStopPercent=50% of the open profit, with at least 1-point minimum step to avoid modify spam. MaxConsecutiveLosses=3 triggers a 60-minute pause; MaxSpreadPoints=30 (3 pips) blocks the tick entirely.

Take Profit

TP is computed at entry as currentPrice + (currentPrice - stopLoss) * RewardToRiskRatio for buys and the mirror for sells. With RewardToRiskRatio=2.0 the EA enforces a clean 1:2 RR geometry: a $1 win per $0.5 risk, regardless of how far the entry price was from the zone. TP is sent to the broker as a static limit order and is not actively managed.

Best For

Recommended setup: minimum balance $100 (the EA targets 0.01 fixed lot, so position-size scaling is manual not account-based). XAUUSD on M30 (Timeframe input integer 4 maps to PERIOD_M30) is the design target. ECN or RAW-spread broker with typical spread under 30 points (3 pips) is required because MaxSpreadPoints=30 blocks the tick outright. Brokers with GMT+2 or GMT+3 server time (IC Markets, Exness, Pepperstone) match the trading-hours default of 08:00-20:00 when EnableTimeFilter is on. Keep UseDEMAConfirmation enabled — it is the v3.3 signature addition; disable it and you are running the v3.1 path. With four default-on gates plus price surge, expect modest trade frequency: roughly 1-3 setups per day on a trending XAUUSD M30 day, less on range days.

Strategy Logic

Pipsgrowth EX15015 SMC-OrderBlock — Strategy Logic Analysis (from .mq5 source)

Family: SMC-OrderBlock Magic: 22215015 Version: 2.00

BRIEF: Liquidity-trap scalper that detects swing-based liquidity zones, price surges and volume spikes, then enters on pin-bar / engulfing / RSI / DEMA-crossover confirmation with R:R SL/TP. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

INDICATOR STACK:

  • Standard MT5 indicators

KEY FUNCTIONS:

  • CheckIndicatorHandle()
  • ReleaseIndicatorHandles()
  • AnalyzeMarketState()
  • ManageOpenPositions()
  • NormalizeLotSize()
  • CalculatePositionSize()
  • UpdateTradeStatistics()
  • UpdateLiquidityZones()
  • IdentifySwingPoints()
  • FindSwingHigh()
  • FindSwingLow()
  • AddLiquidityZone()
  • ...and 29 more

INTERNAL CONSTANTS (0 total):

INPUT PARAMETERS (38 total across 5 groups):

  • [=== General Settings ===] MagicNumber = 22215015 // Magic Number
  • [=== General Settings ===] InpTradeComment = "Psgrowth.com Expert_15015" // Trade Comment
  • [=== General Settings ===] EnableDebug = true // Enable Debug Messages
  • [=== General Settings ===] Timeframe = 4 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Trading Timeframe
  • [=== Liquidity Trap Settings ===] SwingBarCount = 1 // Number of bars for swing detection (smaller value = more swings)
  • [=== Liquidity Trap Settings ===] MaxZoneAge = 24 // Maximum zone age in hours
  • [=== Liquidity Trap Settings ===] PriceSurgePercent = 0.001 // Percent of price movement to consider as surge (0.001-0.2 recommended)
  • [=== Liquidity Trap Settings ===] RequireVolumeSurge = false // Require volume surge with price movement
  • [=== Liquidity Trap Settings ===] VolumeSurgeMultiplier = 1.5 // Volume threshold as multiplier of average
  • [=== Entry Confirmation ===] UseHigherTimeframeConfirmation = false // Use higher g_Timeframe for trend confirmation
  • [=== Entry Confirmation ===] ConfirmationTimeframe = 6 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Higher timeframe for confirmation
  • [=== Entry Confirmation ===] RequireVolumeConfirmation = false // Require volume confirmation for entry
  • [=== Entry Confirmation ===] UseEngulfingPattern = true // Use engulfing pattern as confirmation
  • [=== Entry Confirmation ===] EngulfingLookback = 3 // Number of bars to look back for engulfing pattern
  • [=== Entry Confirmation ===] UsePinBarConfirmation = true // Use pin bar as confirmation
  • [=== Entry Confirmation ===] PinBarLookback = 3 // Number of bars to look back for pin bar
  • [=== Entry Confirmation ===] PinBarRatio = 0.3 // Ratio of body to shadow for pin bar (smaller = stronger pin)
  • [=== Entry Confirmation ===] UseRSIConfirmation = true // Use RSI as additional confirmation
  • [=== Entry Confirmation ===] RSIPeriod = 14 // RSI period
  • [=== Entry Confirmation ===] RSIOversoldLevel = 30.0 // RSI oversold level for buy signals
  • [=== Entry Confirmation ===] RSIOverboughtLevel = 70.0 // RSI overbought level for sell signals
  • [=== Entry Confirmation ===] UseDEMAConfirmation = true // Use DEMA crossover as confirmation
  • [=== Entry Confirmation ===] DEMAFastPeriod = 8 // Fast DEMA period
  • [=== Entry Confirmation ===] DEMASlowPeriod = 21 // Slow DEMA period
  • [=== Risk Management ===] FixedLotSize = 0.01 // Fixed lot size for all trades
  • [=== Risk Management ===] RewardToRiskRatio = 2.0 // Reward to risk ratio
  • [=== Risk Management ===] EnableTrailingStop = false // Enable trailing stop
  • [=== Risk Management ===] TrailingStopPercent = 50.0 // Trailing stop as percentage of profit
  • [=== Risk Management ===] MaxSpreadPoints = 30 // Maximum spread in points
  • [=== Risk Management ===] MaxConsecutiveLosses = 3 // Max consecutive losses before pausing
  • [=== Risk Management ===] PauseMinutes = 60 // Minutes to pause after max losses
  • [=== Risk Management ===] MaxPositions = 5 // Maximum open positions
  • [=== Trade Filters ===] EnableTimeFilter = false // Enable trading hours filter
  • [=== Trade Filters ===] TradingHoursStart = "08:00" // Trading hours start (broker time)
  • [=== Trade Filters ===] TradingHoursEnd = "20:00" // Trading hours end (broker time)
  • [=== Trade Filters ===] AvoidHighImpactNews = true // Avoid trading during high impact news
  • [=== Trade Filters ===] NewsBufferMinutesBefore = 30 // Minutes to avoid trading before news
  • [=== Trade Filters ===] NewsBufferMinutesAfter = 30 // Minutes to avoid trading after news
Pseudocode
// Pipsgrowth EX15015 SMC-OrderBlock — Execution Flow (from source analysis)
// Family: SMC-OrderBlock
// Liquidity-trap scalper that detects swing-based liquidity zones, price surges and volume spikes, then enters on pin-bar / engulfing / RSI / DEMA-crossover confirmation with R:R SL/TP. 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

Optimized Brokers:
ExnessIC Markets
Optimized Symbols:
XAUUSD
Optimized Timeframes:
M5

How to Install This EA on MT5

  1. 1Download the .mq5 file using the button above
  2. 2Open MetaTrader 5 on your computer
  3. 3Click File → Open Data Folder in the top menu
  4. 4Navigate to MQL5 → Experts and paste the .mq5 file there
  5. 5In MT5, right-click Expert Advisors in the Navigator panel → Refresh
  6. 6Drag the EA onto a chart matching the recommended timeframe
  7. 7Configure parameters according to the table on this page
  8. 8Enable Allow Algo Trading and click OK

EA Parameters

ParameterDefaultDescription
MagicNumber22215015Magic Number
InpTradeComment"Psgrowth.com Expert_15015"Trade Comment
EnableDebugtrueEnable Debug Messages
Timeframe4Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Trading Timeframe
SwingBarCount1Number of bars for swing detection (smaller value = more swings)
MaxZoneAge24Maximum zone age in hours
PriceSurgePercent0.001Percent of price movement to consider as surge (0.001-0.2 recommended)
RequireVolumeSurgefalseRequire volume surge with price movement
VolumeSurgeMultiplier1.5Volume threshold as multiplier of average
UseHigherTimeframeConfirmationfalseUse higher g_Timeframe for trend confirmation
ConfirmationTimeframe6Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Higher timeframe for confirmation
RequireVolumeConfirmationfalseRequire volume confirmation for entry
UseEngulfingPatterntrueUse engulfing pattern as confirmation
EngulfingLookback3Number of bars to look back for engulfing pattern
UsePinBarConfirmationtrueUse pin bar as confirmation
PinBarLookback3Number of bars to look back for pin bar
PinBarRatio0.3Ratio of body to shadow for pin bar (smaller = stronger pin)
UseRSIConfirmationtrueUse RSI as additional confirmation
RSIPeriod14RSI period
RSIOversoldLevel30.0RSI oversold level for buy signals
RSIOverboughtLevel70.0RSI overbought level for sell signals
UseDEMAConfirmationtrueUse DEMA crossover as confirmation
DEMAFastPeriod8Fast DEMA period
DEMASlowPeriod21Slow DEMA period
FixedLotSize0.01Fixed lot size for all trades
RewardToRiskRatio2.0Reward to risk ratio
EnableTrailingStopfalseEnable trailing stop
TrailingStopPercent50.0Trailing stop as percentage of profit
MaxSpreadPoints30Maximum spread in points
MaxConsecutiveLosses3Max consecutive losses before pausing
PauseMinutes60Minutes to pause after max losses
MaxPositions5Maximum open positions
EnableTimeFilterfalseEnable trading hours filter
TradingHoursStart"08:00"Trading hours start (broker time)
TradingHoursEnd"20:00"Trading hours end (broker time)
AvoidHighImpactNewstrueAvoid trading during high impact news
NewsBufferMinutesBefore30Minutes to avoid trading before news
NewsBufferMinutesAfter30Minutes to avoid trading after news
Source Code (.mq5)Open Source
Pipsgrowth_com_EX15015.mq5
#property copyright "Pipsgrowth.com"
#property link      "https://pipsgrowth.com"
#property version   "2.00"
#property strict
#property description "Pipsgrowth.com EX15015 XAUUSD Liquidity Trap EA v3.3 — liquidity-zone scalper with pin-bar/RSI/DEMA confirmation, full 12-layer stack."

#include <Trade/Trade.mqh>
#include <Trade/SymbolInfo.mqh>

// Input parameters: General Settings
ENUM_TIMEFRAMES MapTimeframeInt(int tf)
{
   switch(tf)
   {
      case 1: return PERIOD_M1;
      case 2: return PERIOD_M5;
      case 3: return PERIOD_M15;
      case 4: return PERIOD_M30;
      case 5: return PERIOD_H1;
      case 6: return PERIOD_H4;
      case 7: return PERIOD_D1;
      default: return PERIOD_H1;
   }
}
ENUM_TIMEFRAMES g_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_ConfirmationTimeframe = PERIOD_H1;
input group "=== General Settings ==="
input int    MagicNumber = 22215015;           // Magic Number
input string InpTradeComment = "Psgrowth.com Expert_15015"; // Trade Comment
input bool   EnableDebug = true;               // Enable Debug Messages
input int Timeframe = 4; // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)   // Trading Timeframe

// Input parameters: Liquidity Trap Settings
ENUM_TIMEFRAMES MapTimeframeInt(int tf)
{
   switch(tf)
   {
      case 1: return PERIOD_M1;
      case 2: return PERIOD_M5;
      case 3: return PERIOD_M15;
      case 4: return PERIOD_M30;
      case 5: return PERIOD_H1;
      case 6: return PERIOD_H4;
      case 7: return PERIOD_D1;
      default: return PERIOD_H1;
   }
}
ENUM_TIMEFRAMES g_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_ConfirmationTimeframe = PERIOD_H1;
input group "=== Liquidity Trap Settings ==="
input int    SwingBarCount = 1;                // Number of bars for swing detection (smaller value = more swings)
input int    MaxZoneAge = 24;                  // Maximum zone age in hours
input double PriceSurgePercent = 0.001;        // Percent of price movement to consider as surge (0.001-0.2 recommended)
input bool   RequireVolumeSurge = false;       // Require volume surge with price movement
input double VolumeSurgeMultiplier = 1.5;      // Volume threshold as multiplier of average

// Input parameters: Entry Confirmation
ENUM_TIMEFRAMES MapTimeframeInt(int tf)
{
   switch(tf)

Full source code available on download

Educational purposes only. Do NOT use with real money. Test on demo accounts only.

Tags:ex15015smc-orderblockpipsgrowthfreemt5xauusd

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

Community

Sign in to contributeSign In

Educational purposes only. Do NOT use with real money. Test on demo accounts only.

File NamePipsgrowth_com_EX15015.mq5
File Size97.6 KB
Versionv2.00
PlatformMetaTrader 5
File Type.mq5 Source
StrategyOther
Risk LevelMedium Risk
Timeframes
M5
Currency Pairs
XAUUSD
Min. Deposit$100