P
PipsGrowth
Trend FollowingOpen Source – Free

Pipsgrowth EX16105 Trend

MT5 Expert Advisor (Open Source) · XAUUSD · M5, H1

Pipsgrowth.com EX16105 Hull2EA — four Hull indicator trend EA with multi-filter confirmation, full 12-layer stack.

Overview

Pipsgrowth EX16105 is a Hull2EA v2.00 trend-following EA built around four parallel Hull Moving Average instances, each running on its own period, its own timeframe, and its own internal ADX gate. The header advertises the four-Hull consensus with Heiken Ashi, volume, spread, Kalman, and correlation filters, and the 12-layer stack (REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester). What the source actually does is more specific: every tick, the EA samples direction from each of its four enabled Hull instances at bar shift 1, tallies the long-vote and short-vote counters, and only opens when the consensus count clears InpMinIndicatorsAgree (default 3) on one side while the opposing side stays at zero.

The four Hulls are not just retuned versions of the same MA. The default parameters in the source are Hull1_Period=20, Hull2_Period=200, Hull3_Period=34, Hull4_Period=55, all with HullX_Divisor=2.0, applied price close, MA method MODE_LWMA, flat-sensitivity 3.0 points, flat-bars 3. The 20-period fast Hull reacts to local turns, the 200-period anchor defines the regime, and the 34 and 55 sit in the swing-trend middle. That wide spread (1:10 between fastest and slowest) is the design: short bursts on Hull1, regime lock on Hull2, and Hull3 + Hull4 act as the noisy middle that the 3-of-4 vote filters out. The CHullCalculator class in the source implements Hull via a WMA-of-differences construction (2×WMA(period/divisor) − WMA(period), then smoothed by WMA(sqrt(period))), and GetDirection returns 1 when the new Hull is above the prior bar's Hull, -1 when below, and 0 when the bar-to-bar move is below HullX_FlatSensitivity × _Point. Each Hull also carries an optional iADX filter that suppresses its vote when ADX drops below the per-Hull threshold (default 20).

Filters layer on top. Heiken Ashi Smoothed is implemented internally via CHeikenAshiSmoothedCalculator, which smooths Open/High/Low/Close each with its own MA (default Heiken_Period=7, LWMA) and reconstructs the Heiken bar series on top, returning 1/0/-1 by close-vs-open. VolumeFilterPasses compares a 20-bar average tick volume to a 1.2× multiplier on the configured volume timeframe. SpreadFilterPasses checks the current spread against Spread_MaxPoints=25.0. RangeFilterPasses skips the bar when its true range sits in the bottom 40th percentile over 50 bars. KalmanFilterPasses runs an in-EA Kalman smoother (q = ratio × 0.01, r = 1) over 100 closes and rejects entries when the slope of the filtered state is below Kalman_MinSlopePoints=5.0. ATRFilterPasses blocks entries when ATR(14) on the configured timeframe is below 15.0 points, and an optional higher-timeframe ATR pass (default 25.0 points) gates regime volatility. CorrelationFilterPasses reads the last 120 bars of the configured reference symbol — default Correlation_Symbol="EURJPY" — and rejects the entry if |corr| exceeds 0.85 with at least 200 bars of history. LevelsFilterPasses reads support/resistance levels from the chart (Levels_UseObjects=true) and refuses entries inside Levels_MinDistancePts=40. StructureFilterPasses requires a fractal break (default 60-bar lookback, 5.0-point slack) or a Donchian break (20-bar, 5.0-point slack). SwingFilterPasses blocks trades within Swing_MinDistancePoints=30 of a recent swing extreme over 20 bars.

Entry, exit, and trade management are direct. The EA sends a market order with InpLots=0.10 by default, InpStopLossPoints=300.0, InpTakeProfitPoints=300.0 — a balanced 1:1 R:R — through a CTrade instance with magic 22216105, slippage 20 points, and filling mode resolved per symbol. Comments are stamped as "Psgrowth.com Expert_16105" truncated to 31 characters plus the BUY/SELL suffix. Exit logic runs HandleReverseSignal: when InpCloseOnOpposite=true, the moment a single Hull flips into the opposing direction (g_minCloseAgreeProfit defaults to 1) and the position is in profit, the EA closes it. InpCloseOnOppositeEvenIfInLose is off by default, so the EA does not close losing trades on a single opposite vote. InpEnableTrailingStop is off by default; if the operator switches it on, ManageTrailingStops ratchets the stop every time the trade moves InpTrailingTriggerPts=150.0 in profit, stepping by InpTrailingStepPts=50.0. HandleSessionClose runs an optional 23:00 server-time cut (InpSessionCloseProfitOnly=false by default; InpSessionBlockNewTrades=true by default), and SessionFilterAllowsTrading gates the entry itself against five session windows: Tokyo (23:00–08:00 UTC), London (07:00–16:00 UTC), New York (12:00–21:00 UTC), Tokyo/London overlap (07:00–08:00 UTC), and London/New York overlap (12:00–16:00 UTC), with per-session toggles and Session_CustomOffsetHours. InpMaxOpenPositions defaults to 0 (unlimited), InpEnableMarginGuard defaults to off with a 200% margin floor when enabled, and InpEnableProfitGate defaults to off with a 20-point per-trade minimum when turned on. Risk is computed as fixed-lot per order — there is no percent-risk sizing in the input group — so position size is operator-controlled via InpLots alone.

Operationally this is a four-Hull consensus with a 3-of-4 vote gate, eleven optional filters, and a balanced 1:1 R:R, designed to be the most configurable of the EX16xxx Hull2EA group. The class-based internal calculators (CHullCalculator, CHeikenAshiSmoothedCalculator, CKalmanCalculator) mean the EA does not depend on any external iCustom being attached to the chart — it builds its own indicator state from raw price, ADX, and ATR handles. The version label is 2.00, the magic is 22216105, the lot default is 0.10, and the EA was written to be portable across FX majors and gold/metals per the source header. With InpMaxOpenPositions=0 and no daily-drawdown circuit breaker, the operator is responsible for sizing and broker selection: a 0.10-lot default on XAUUSD at $100 minimum deposit is feasible but tight, and on the 5-minute timeframe the EA will fire frequently enough that the filters do most of the work suppressing low-quality bars. The trailing stop and the 3-of-4 vote threshold are the two single most important tuning knobs in the source.

Strategy Deep Dive

Four parallel CHullCalculator instances reconstruct Hull Moving Averages internally from raw closes (WMA-of-differences, sqrt(period) smoothing) and each emits a +1/0/-1 vote at bar shift 1, gated by an optional per-Hull ADX and a 3-point flat-bar filter. On each OnTick the EA tallies the votes and runs them through eleven independent optional filters (Heiken Ashi Smoothed via 4 smoothed MAs, tick-volume vs 1.2× average, spread vs 25 points, true-range vs 40th percentile, in-EA Kalman slope vs 5 points, ATR(14) vs 15 points plus optional HTF ATR(14) vs 25 points, 120-bar |corr| with EURJPY vs 0.85, Levels object proximity vs 40 points, fractal/Donchian structure break, swing-distance vs 30 points) before opening a 0.10-lot market order with 300/300 SL/TP. Exits flow through HandleReverseSignal (close on a single opposite Hull vote when in profit), ManageTrailingStops (150-point trigger, 50-point step, off by default), and HandleSessionClose (23:00 server cut, blocks new entries by default).

Entry Signal

On every tick the EA samples direction from each of four enabled Hull Moving Averages (Hull1_Period=20, Hull2_Period=200, Hull3_Period=34, Hull4_Period=55, all LWMA on close) at bar shift 1. A long entry fires when longVotes ≥ InpMinIndicatorsAgree=3 and shortVotes=0; a short entry mirrors that. Optional filters (Heiken Ashi Smoothed, Volume, Spread, Range, Kalman, ATR, Correlation against EURJPY, Levels proximity, Structure fractal/Donchian, Swing distance) can each independently veto the bar before the order is sent.

Exit Signal

InpCloseOnOpposite=true by default — when a single Hull flips into the opposing direction (g_minCloseAgreeProfit=1) and the position is in profit, HandleReverseSignal closes it. InpCloseOnOppositeEvenIfInLose is off by default, so losing trades are not auto-closed on a single opposing vote. Optional 23:00 server-time session cut (InpSessionCloseProfitOnly=false, InpSessionBlockNewTrades=true) can also flatten positions and halt new entries.

Stop Loss

Each order is sent with InpStopLossPoints=300.0 points — a 1:1 R:R paired with InpTakeProfitPoints=300.0. There is no per-trade basket SL; with InpMaxOpenPositions=0 (unlimited) and no daily-drawdown circuit breaker, the operator controls risk via InpLots and the session/trailing toggles.

Take Profit

Each order is sent with InpTakeProfitPoints=300.0 points, paired with the 300.0-point SL for a 1:1 R:R. There is no profit-lock ladder or partial-close scaling in the source — exits come from the opposite-Hull signal, the optional trailing stop (when InpEnableTrailingStop is switched on), or the session cut at 23:00 server time.

Best For

Minimum recommended balance: $100 (matches the EA's published minDeposit). Best paired with XAUUSD on M5–H1 — the lot default 0.10 keeps a 300/300 point SL/TP within reach on gold's typical daily range, and the 3-of-4 Hull vote with eleven optional filters favors the high-volatility bars that XAUUSD produces. Use an ECN or RAW-spread broker so the 25-point spread cap is rarely hit, and keep the session filter on Tokyo + London/New York overlap if you want to match the EA's highest-conviction window. Risk per trade is fixed at 0.10 lot — operators wanting percent-risk must run an external risk manager.

Strategy Logic

Pipsgrowth EX16105 Trend — Strategy Logic Analysis (from .mq5 source)

Family: Trend Magic: 22216105 Version: 2.00

BRIEF: Expert Advisor that trades using four Hull indicators with Heiken Ashi, volume, spread, Kalman and correlation filters. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

INDICATOR STACK:

  • Standard MT5 indicators

KEY FUNCTIONS:

  • InitHullHandle()
  • InitHeikenHandle()
  • InitKalmanHandle()
  • InitAtrHandle()
  • AttachIndicatorToChart()
  • DetachIndicatorFromChart()
  • ReleaseIndicators()
  • IndicatorsReady()
  • HullDirection()
  • HeikenDirection()
  • KalmanDirection()
  • KalmanFilterPasses()
  • ...and 28 more

INTERNAL CONSTANTS (0 total):

INPUT PARAMETERS (80 total across 18 groups):

  • [=== Trade Settings ===] InpLots = 0.10 // Lot size
  • [=== Trade Settings ===] InpStopLossPoints = 300.0 // Stop loss (points)
  • [=== Trade Settings ===] InpTakeProfitPoints = 300.0 // Take profit (points)
  • [=== Trade Settings ===] InpSlippagePoints = 20 // Max slippage (points)
  • [=== Trade Settings ===] InpMagicNumber = 22216105 // Magic number
  • [=== Trade Settings ===] InpTradeComment = "Psgrowth.com Expert_16105" // Trade comment
  • [=== Trade Settings ===] InpEnableProfitGate = false // Require existing trades be in profit
  • [=== Trade Settings ===] InpProfitGatePoints = 20.0 // Minimum profit (points) per trade
  • [=== Trade Settings ===] InpMaxOpenPositions = 0 // Maximum open positions (0 = unlimited)
  • [=== Trade Settings ===] InpEnableTrailingStop = false // Enable trailing stop management
  • [=== Trade Settings ===] InpTrailingTriggerPts = 150.0 // Trailing stop trigger (points)
  • [=== Trade Settings ===] InpTrailingStepPts = 50.0 // Trailing stop step (points)
  • [=== Trade Settings ===] InpEnableMarginGuard = false // Enforce minimum margin level before new trades
  • [=== Trade Settings ===] InpMinMarginLevelPerc = 200.0 // Minimum margin level (%)
  • [=== Signal Settings ===] InpSignalBarShift = 1 // Signal bar shift (0=current,1=closed)
  • [=== Signal Settings ===] InpMinIndicatorsAgree = 3 // Minimum Hulls agreeing
  • [=== Signal Settings ===] InpCloseOnOpposite = true // Close trades on opposite agreement if in profit
  • [=== Signal Settings ===] InpMinIndicatorsAgreeCloseProfit = 1 // Minimum Hulls to close in profit
  • [=== Signal Settings ===] InpCloseProfitPoints = 0.0 // Minimum profit (points) to close on opposite
  • [=== Signal Settings ===] InpCloseOnOppositeEvenIfInLose = false // Close trades on opposite agreement even if losing
  • [=== Signal Settings ===] InpMinIndicatorsAgreeCloseLoss = 1 // Minimum Hulls to close even if losing
  • [=== Session Controls ===] InpEnableSessionClose = false // Enable timed close & halt
  • [=== Session Controls ===] InpSessionCloseHour = 23 // Hour (broker time) to trigger close
  • [=== Session Controls ===] InpSessionCloseMinute = 0 // Minute to trigger close
  • [=== Session Controls ===] InpSessionCloseProfitOnly = false // Only close profitable positions
  • [=== Session Controls ===] InpSessionBlockNewTrades = true // Block new trades after timed close
  • [=== Session Trading Filter ===] Session_FilterEnabled = false // Restrict trading to selected market sessions
  • [=== Session Trading Filter ===] Session_CustomOffsetHours = 0.0 // Additional offset (hours) applied to all sessions
  • [=== Session Trading Filter ===] Session_EnableTokyo = true // Allow Tokyo session window
  • [=== Session Trading Filter ===] Session_EnableLondon = true // Allow London session window
  • [=== Session Trading Filter ===] Session_EnableNewYork = true // Allow New York session window
  • [=== Session Trading Filter ===] Session_EnableTokyoLondonOverlap = false // Allow Tokyo/London overlap window
  • [=== Session Trading Filter ===] Session_EnableLondonNewYorkOverlap = true // Allow London/New York overlap window
  • [=== Hull 1 Inputs ===] Hull1_Enabled = true // Enable Hull 1
  • [=== Hull 1 Inputs ===] Hull1_Price = 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
  • [=== Hull 1 Inputs ===] Hull1_Timeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 1 Inputs ===] Hull1_AdxTimeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 2 Inputs ===] Hull2_Enabled = true // Enable Hull 2
  • [=== Hull 2 Inputs ===] Hull2_Price = 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
  • [=== Hull 2 Inputs ===] Hull2_Timeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 2 Inputs ===] Hull2_AdxTimeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 3 Inputs ===] Hull3_Enabled = true // Enable Hull 3
  • [=== Hull 3 Inputs ===] Hull3_Price = 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
  • [=== Hull 3 Inputs ===] Hull3_Timeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 3 Inputs ===] Hull3_AdxTimeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 4 Inputs ===] Hull4_Enabled = true // Enable Hull 4
  • [=== Hull 4 Inputs ===] Hull4_Price = 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
  • [=== Hull 4 Inputs ===] Hull4_Timeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 4 Inputs ===] Hull4_AdxTimeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Heiken Ashi Smoothed Filter ===] Heiken_Enabled = false // Require Heiken Ashi Smoothed alignment
  • [=== Heiken Ashi Smoothed Filter ===] Heiken_Timeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Volume Confirmation Filter ===] Volume_Enabled = false // Require higher timeframe tick volume confirmation
  • [=== Volume Confirmation Filter ===] Volume_Timeframe = 8 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Spread Filter ===] Spread_Enabled = false // Block trades when spread exceeds limit
  • [=== Range Volatility Filter ===] Range_Enabled = false // Skip trades if true range is too quiet
  • [=== Kalman Filter Confirmation ===] Kalman_Enabled = false // Require Kalman filter agreement
  • [=== Kalman Filter Confirmation ===] Kalman_Timeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Kalman Filter Confirmation ===] Kalman_Price = 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
  • [=== ATR Volatility Filter ===] ATR_Enabled = false // Block trades in low volatility regimes
  • [=== ATR Volatility Filter ===] ATR_Timeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== ATR Volatility Filter ===] ATR_HTF_Enabled = false // Require higher timeframe ATR confirmation
  • [=== ATR Volatility Filter ===] ATR_HTF_Timeframe = 8 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Correlation Filter ===] Correlation_Enabled = false // Skip trades when reference symbol is highly correlated
  • [=== Correlation Filter ===] Correlation_Timeframe = 8 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Levels Proximity Filter ===] Levels_Enabled = false // Block trades too close to nearby S/R levels
  • [=== Levels Proximity Filter ===] Levels_UseObjects = true // Read level objects from levels indicator if present
  • [=== Levels Proximity Filter ===] Levels_Timeframe = 10 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Fallback HTF for level calculations
  • [=== Levels Proximity Filter ===] Levels_MinDistancePts = 40.0 // Minimum distance (points) to opposing level
  • [=== Levels Proximity Filter ===] Levels_HighRangePts = 2000 // High range threshold (points)
  • [=== Levels Proximity Filter ===] Levels_LowRangePts = 500 // Low range threshold (points)
  • [=== Structure Breakout Filter ===] Structure_Enabled = false // Require structural break confirmation
  • [=== Structure Breakout Filter ===] Structure_Timeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Structure Breakout Filter ===] Structure_UseFractal = true // Require break beyond last fractal extreme
  • [=== Structure Breakout Filter ===] Structure_UseDonchian = false // Require break beyond Donchian channel
  • [=== Structure Breakout Filter ===] Structure_FractalLookback = 60 // Bars to search for last fractal
  • [=== Structure Breakout Filter ===] Structure_FractalSlackPts = 5.0 // Extra points above/below fractal
  • [=== Structure Breakout Filter ===] Structure_DonchianPeriod = 20 // Donchian lookback (bars)
  • [=== Structure Breakout Filter ===] Structure_DonchianSlackPts = 5.0 // Extra points beyond Donchian level
  • [=== Swing Distance Filter ===] Swing_Enabled = false // Block trades near recent swing extremes
  • [=== Swing Distance Filter ===] Swing_MinDistancePoints = 30.0 // --- constants & globals
Pseudocode
// Pipsgrowth EX16105 Trend — Execution Flow (from source analysis)
// Family: Trend
// Expert Advisor that trades using four Hull indicators with Heiken Ashi, volume, spread, Kalman and correlation filters. 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:
M5H1

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 an H4 or Daily chart for best results
  7. 7Configure EMA periods, ADX threshold, and lot size in the dialog
  8. 8Enable Allow Algo Trading and click OK

EA Parameters

ParameterDefaultDescription
InpLots0.10Lot size
InpStopLossPoints300.0Stop loss (points)
InpTakeProfitPoints300.0Take profit (points)
InpSlippagePoints20Max slippage (points)
InpMagicNumber22216105Magic number
InpTradeComment"Psgrowth.com Expert_16105"Trade comment
InpEnableProfitGatefalseRequire existing trades be in profit
InpProfitGatePoints20.0Minimum profit (points) per trade
InpMaxOpenPositions0Maximum open positions (0 = unlimited)
InpEnableTrailingStopfalseEnable trailing stop management
InpTrailingTriggerPts150.0Trailing stop trigger (points)
InpTrailingStepPts50.0Trailing stop step (points)
InpEnableMarginGuardfalseEnforce minimum margin level before new trades
InpMinMarginLevelPerc200.0Minimum margin level (%)
InpSignalBarShift1Signal bar shift (0=current,1=closed)
InpMinIndicatorsAgree3Minimum Hulls agreeing
InpCloseOnOppositetrueClose trades on opposite agreement if in profit
InpMinIndicatorsAgreeCloseProfit1Minimum Hulls to close in profit
InpCloseProfitPoints0.0Minimum profit (points) to close on opposite
InpCloseOnOppositeEvenIfInLosefalseClose trades on opposite agreement even if losing
InpMinIndicatorsAgreeCloseLoss1Minimum Hulls to close even if losing
InpEnableSessionClosefalseEnable timed close & halt
InpSessionCloseHour23Hour (broker time) to trigger close
InpSessionCloseMinute0Minute to trigger close
InpSessionCloseProfitOnlyfalseOnly close profitable positions
InpSessionBlockNewTradestrueBlock new trades after timed close
Session_FilterEnabledfalseRestrict trading to selected market sessions
Session_CustomOffsetHours0.0Additional offset (hours) applied to all sessions
Session_EnableTokyotrueAllow Tokyo session window
Session_EnableLondontrueAllow London session window
Session_EnableNewYorktrueAllow New York session window
Session_EnableTokyoLondonOverlapfalseAllow Tokyo/London overlap window
Session_EnableLondonNewYorkOverlaptrueAllow London/New York overlap window
Hull1_EnabledtrueEnable Hull 1
Hull1_Price1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
Hull1_Timeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull1_AdxTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull2_EnabledtrueEnable Hull 2
Hull2_Price1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
Hull2_Timeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull2_AdxTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull3_EnabledtrueEnable Hull 3
Hull3_Price1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
Hull3_Timeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull3_AdxTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull4_EnabledtrueEnable Hull 4
Hull4_Price1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
Hull4_Timeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull4_AdxTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Heiken_EnabledfalseRequire Heiken Ashi Smoothed alignment
Heiken_Timeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Volume_EnabledfalseRequire higher timeframe tick volume confirmation
Volume_Timeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Spread_EnabledfalseBlock trades when spread exceeds limit
Range_EnabledfalseSkip trades if true range is too quiet
Kalman_EnabledfalseRequire Kalman filter agreement
Kalman_Timeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Kalman_Price1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
ATR_EnabledfalseBlock trades in low volatility regimes
ATR_Timeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
ATR_HTF_EnabledfalseRequire higher timeframe ATR confirmation
ATR_HTF_Timeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Correlation_EnabledfalseSkip trades when reference symbol is highly correlated
Correlation_Timeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Levels_EnabledfalseBlock trades too close to nearby S/R levels
Levels_UseObjectstrueRead level objects from levels indicator if present
Levels_Timeframe10Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Fallback HTF for level calculations
Levels_MinDistancePts40.0Minimum distance (points) to opposing level
Levels_HighRangePts2000High range threshold (points)
Levels_LowRangePts500Low range threshold (points)
Structure_EnabledfalseRequire structural break confirmation
Structure_Timeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Structure_UseFractaltrueRequire break beyond last fractal extreme
Structure_UseDonchianfalseRequire break beyond Donchian channel
Structure_FractalLookback60Bars to search for last fractal
Structure_FractalSlackPts5.0Extra points above/below fractal
Structure_DonchianPeriod20Donchian lookback (bars)
Structure_DonchianSlackPts5.0Extra points beyond Donchian level
Swing_EnabledfalseBlock trades near recent swing extremes
Swing_MinDistancePoints30.0--- constants & globals
Source Code (.mq5)Open Source
Pipsgrowth_com_EX16105.mq5
#property copyright "Pipsgrowth.com"
#property link      "https://pipsgrowth.com"
#property version   "2.00"
#property strict
#property description "Pipsgrowth.com EX16105 Hull2EA — four Hull indicator trend EA with multi-filter confirmation, full 12-layer stack."

#include <Trade/Trade.mqh>
#include <Trade/PositionInfo.mqh>
#include <Indicators/Indicator.mqh>

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_APPLIED_PRICE MapAppliedPriceInt(int ap)
{
   switch(ap)
   {
      case 1: return PRICE_CLOSE;
      case 2: return PRICE_OPEN;
      case 3: return PRICE_HIGH;
      case 4: return PRICE_LOW;
      case 5: return PRICE_MEDIAN;
      case 6: return PRICE_TYPICAL;
      case 7: return PRICE_WEIGHTED;
      default: return PRICE_CLOSE;
   }
}
ENUM_TIMEFRAMES g_Hull1_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_Hull1_AdxTimeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_Hull2_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_Hull2_AdxTimeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_Hull3_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_Hull3_AdxTimeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_Hull4_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_Hull4_AdxTimeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_Heiken_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_Volume_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_Kalman_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_ATR_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_ATR_HTF_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_Correlation_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_Levels_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_Structure_Timeframe = PERIOD_H1;
ENUM_APPLIED_PRICE g_Hull1_Price = PRICE_CLOSE;
ENUM_APPLIED_PRICE g_Hull2_Price = PRICE_CLOSE;
ENUM_APPLIED_PRICE g_Hull3_Price = PRICE_CLOSE;
ENUM_APPLIED_PRICE g_Hull4_Price = PRICE_CLOSE;
ENUM_APPLIED_PRICE g_Kalman_Price = PRICE_CLOSE;
input group "=== Trade Settings ==="

Full source code available on download

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

Tags:ex16105trendpipsgrowthfreemt5xauusd

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_EX16105.mq5
File Size142.2 KB
Versionv2.00
PlatformMetaTrader 5
File Type.mq5 Source
StrategyTrend Following
Risk LevelMedium Risk
Timeframes
M5H1
Currency Pairs
XAUUSD
Min. Deposit$100