P
PipsGrowth
Trend FollowingOpen Source – Free

Pipsgrowth EX16099 Trend

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

Pipsgrowth.com EX16099 Hull2EA — four Hull indicator trend EA with advanced exit strategies, full 12-layer stack.

Overview

Pipsgrowth EX16099 Trend is a four-Hull consensus EA built around the idea that a single moving average lies, but four of them voting together can be the spine of a robust trend system. The expert advisor wires up four independent Hull Moving Average instances (Hull1_Period = 65 with divisor 16.5 on M1, Hull2_Period = 90 with divisor 14.0 on M30, Hull3_Period = 48 with divisor 1.62 on D1, and Hull4_Period = 185 with divisor 14.4 on D1) and asks them to vote on direction every tick. Each Hull can also be filtered by its own ADX gate (Hull1_AdxPeriod = 6, threshold 70.0; Hull2_AdxPeriod = 82, threshold 68.0; Hull3_AdxPeriod = 101, threshold 84.0; Hull4_AdxPeriod = 116, threshold 35.0) so a Hull is only allowed to vote when its own local trend is strong enough. The result is a vote count of long/short Hulls, and the EA trades only when the count clears a configurable threshold (InpMinIndicatorsAgreeForInitialTrades = 2, InpMinIndicatorsAgreeForAdditonalTrades = 1). Initial entries therefore need two of the four Hulls leaning the same way; scaling-in entries on the same direction only need one, which is what the brief calls the SIGNAL + ENTRY + CONFIRM + SCALING layers.

The biggest of the twelve layers is the REGIME filter. The Regime_Detect() block measures ADX against InpRegimeTrendADX (25.0) and ATR against InpRegimeVolatileATR (1.5) and InpRegimeQuietATR (0.7) to bucket the market into one of four labels: trending, ranging, quiet, or volatile. A regime change only sticks after InpRegimeConfirmBars = 3 consecutive bars agree. The OnTick gate then refuses to take an initial entry when the regime is "quiet" or "ranging" — only trending or volatile regimes are tradeable, which is the AUTO-ADAPT half of the regime layer. This single rule does more for the equity curve than almost any other setting, because it stops the Hulls from being whipsawed in sideways tape.

A second gate that runs before every entry is the NO-TRADE filter, and it is genuinely heavy. The IsNfpBlackoutActive() block, the session filter (Asian 04:20–19:40 and US 00:00–10:00 by default with European disabled), the InpEnableSpreadFilter against InpMaxSpreadPoints = 20, the InpEnableAtrFilter comparing current ATR(60) to its 185-bar average at a 0.69× minimum, the InpEnableVolumeFilter comparing current tick volume to a 10-bar average at 0.65×, the InpEnableChoppinessFilter (ADX and range-compression layers are active by default, the Choppiness Index and adaptive ATR layers are off), the InpEnableMarginGuard with InpMinMarginLevelPerc = 240, and the correlation monitor watching USDJPY and USDCHF correlations against the chart symbol all have to be green before the EA will arm a new position. Each gate is implemented in its own function — SpreadAllowsEntry, VolumeAllowsEntry, BarRangeAllowsEntry, CorrelationMonitorAllowsEntry, IsMarketChoppy — and the dashboard helpers (DashboardSetFilter, SetDashboardBlockReason) print a reason for any block to the chart.

Confirmation is the third stage. If InpEnableRsiConfirmation is on, the EA calls GetRsiValue() on a 41-period RSI and demands a long vote sit inside [36.0, 70.0] or a short vote sit inside [40.0, 53.0]. The asymmetry is deliberate — the buy band is wider to allow trends to extend, and the sell band is tighter because most of the edge comes from short bursts. If InpJurik1_Enabled is enabled, an additional Jurik filter must agree on direction, separately for initial versus additional trades. Signal stability is the last check: InpRequireStableSignal forces the consensus to persist for InpStableBarsRequired = 2 closed bars, computed by HullConsensusAtShift walking back through the bar history. Only then does OpenPosition() actually fire.

Position management is the MANAGE layer. Lots come from DetermineTradeVolume(), which respects InpMoneyManagementMode (default MM_MODE_PERCENT_RISK with InpRiskPerTradePercent = 5.5) and the SL distance in points. SL and TP are set in OpenPosition at InpStopLossPoints = 200 and InpTakeProfitPoints = 2000 (a 1:10 initial asymmetry that the trailing stop turns into a much tighter real distribution). After entry, ManageTrailingStops() ratchets the stop after InpTrailingTriggerPts = 550 points of profit with a InpTrailingStepPts = 20 step, CheckBreakEvenAndLock() pushes the stop to entry plus InpBreakEvenOffset = 35 after InpBreakEvenTrigger = 288 of profit, and the InpEnableProfitLock ladder (off by default) tightens the stop by InpProfitLockStep every InpProfitLockIncrement points. InpEnableProfitGate also blocks any additional entry until the existing basket is up at least InpProfitGatePoints = 10 per trade.

The EXIT layer is seven independent modules wired up in CheckAllExits(). The Stoch exit is the only one enabled by default — it loads a 47/27/23 stochastic on H1, waits for the %K/%D cross after hitting 80/20 (InpStochWaitCross), and closes losing positions only with a 26-point minimum profit gate. The other six are off by default and can be turned on individually: CCI exhaustion (period 28, OB 211, OS -124, 12-bar divergence), MACD histogram slope (12/26/9, 2-bar slope, 0.0001 minimum change), Swing reversal (3-left, 2-right, 20-point min swing, partial close of half), ROC (period 12, 0.5 threshold, 2 weak bars), MTF alignment (50-EMA on a higher timeframe, oldest 50% closed first), and Parabolic SAR (step 0.02, max 0.2, all-positions-on-flip). The Volatility Spike exit (enabled by default) closes when ATR(14) exceeds 2.5× its 50-bar average. The Reversal and Weekend modules are also off by default but available. The OnTick path is sequential: profit-scaling first, then break-even/lock, then time-based, then momentum, then volatility, then regime, then the advanced exit manager, then choppiness, then reversal, then weekend. Each call walks the position ticket array and only acts on the tickets the EA actually owns (InpMagicNumber = 22216099).

The opposite-signal close is its own lever. InpCloseOnOpposite (true) makes ClosePositions() close all longs when 3 of the 4 Hulls flip short AND the longs are at least 80 points in profit; InpCloseOnOppositeEvenIfInLose extends that to 4-of-4 Hull agreement when the basket is in drawdown. The intent is to give the consensus system a clean slate when direction clearly changes, rather than waiting for the slow Hull4 to agree.

What this means in practice is that the EA produces a relatively small number of high-conviction trades. With 2-of-4 Hulls required to agree and a regime filter that refuses to trade in quiet or ranging tape, the basket typically holds one to three positions at a time, scaling in only on the same direction and only when the existing basket is already green. Backtests with the default inputs on M5 XAUUSD over a multi-year window usually show a positive expected value with a flat equity curve in sideways markets, which is the design goal: trade trends, ignore noise, never add to a losing basket. The .mq5 file is a single-file build (with the ExitManager class inlined) so the user gets one drop-in EA that ships the full consensus engine plus all twelve layers turned on at sensible defaults, and every layer is tunable through the inputs panel.

Strategy Deep Dive

OnInit creates four iCustom Hull handles (periods 65, 90, 48, 185 on M1, M30, D1, D1) and four ADX handles for the per-Hull ADX gates, then counts the active indicators to set g_minInitialAgreement = 2 and g_minAdditionalAgreement = 1. OnTick walks the four Hulls through HullDirection() to collect long and short votes, requires the consensus to be stable for 2 closed bars, refuses entries when Regime_Detect() labels the market quiet or ranging, gates on spread ≤ 20 points, ATR ≥ 0.69× its 185-bar average, tick volume ≥ 0.65× its 10-bar average, and a 41-period RSI inside the buy or sell band, then calls OpenPosition() which sizes the lot from InpRiskPerTradePercent = 5.5 against the 200-point stop. After the entry, the same OnTick walks the basket through ManageTrailingStops, the seven exit modules, the choppiness filter, and the weekend check; an opposite-signal close fires when 3 of 4 Hulls flip on a profitable basket (or 4 of 4 if closing losers is allowed).

Entry Signal

Four independent Hull Moving Average instances vote on direction every tick. An initial entry fires when at least 2 of the 4 Hulls agree (InpMinIndicatorsAgreeForInitialTrades = 2), the consensus persists for 2 closed bars (InpRequireStableSignal + InpStableBarsRequired = 2), the ADX-based regime is either trending or volatile, and a 41-period RSI sits inside the buy band [36, 70] or sell band [40, 53]. Lots are sized by InpRiskPerTradePercent = 5.5 of balance against the 200-point stop loss.

Exit Signal

Exits are evaluated in order: profit-scaling ladder, break-even + lock, time-based, momentum, volatility-spike (ATR 2.5× 50-bar average, default on), regime-change, then the seven-module exit manager (Stoch 47/27/23 cross on 80/20 enabled by default, plus optional CCI, MACD slope, Swing, ROC, MTF, SAR), then choppiness filter, then reversal, then weekend. An opposite-signal close fires when 3 of 4 Hulls flip against the open position and the basket is at least 80 points in profit, or 4 of 4 Hulls agree and the close-in-loss flag is on.

Stop Loss

Initial stop loss is fixed at InpStopLossPoints = 200 points. After entry, ManageTrailingStops() ratchets the stop every 20 points once profit reaches InpTrailingTriggerPts = 550, and CheckBreakEvenAndLock() pushes the stop to entry + 35 once profit reaches InpBreakEvenTrigger = 288. A daily-drawdown circuit breaker (off by default) can stop new entries at 5% or close all positions.

Take Profit

Initial take profit is InpTakeProfitPoints = 2000 points (a 1:10 RR that the trailing stop usually turns into a much tighter real exit). When InpEnableProfitScaling is on, the EA can take partial profits at 50, 100, 200 points (30/30/40 percent by default). InpEnableProfitLock (off by default) can also tighten the stop every 500 points of profit.

Best For

Best for traders running XAUUSD on M5 with at least $100 starting capital who want a multi-indicator trend system that already includes session, NFP, spread, ATR, volume, choppiness, and correlation gates out of the box. The default config is a 5.5% per-trade risk budget, so a $1,000 account is a more comfortable starting balance for a multi-position basket, and an ECN or low-spread broker is required because the EA refuses entries when spread exceeds InpMaxSpreadPoints = 20. Works best during the Asian (04:20–19:40 broker time) and US (00:00–10:00) sessions, with European trading disabled by default — turn it on if your broker's server time lets the European box overlap London hours.

Strategy Logic

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

Family: Trend Magic: 22216099 Version: 2.00

BRIEF: Expert Advisor that trades using four Hull indicators with advanced exit strategies and multi-layer risk management. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

INDICATOR STACK:

  • Standard MT5 indicators

KEY FUNCTIONS:

  • PrepareTradeComment()
  • DashboardFormatTimeframe()
  • DashboardDirectionString()
  • DashboardFilterStatusText()
  • DashboardDeleteObjects()
  • DashboardCreateRectangle()
  • DashboardCreateLabel()
  • DashboardSetLabel()
  • DashboardEnsureLayout()
  • DashboardCaptureHullInputs()
  • DashboardSeedFilterDefaults()
  • DashboardResetStates()
  • ...and 132 more

INTERNAL CONSTANTS (0 total):

INPUT PARAMETERS (367 total across 52 groups):

  • [=== CCI Exhaustion Exit ===] InpEnableCCIExit = false // Enable CCI exhaustion exit
  • [=== CCI Exhaustion Exit ===] InpCCITimeframe = 5 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // CCI timeframe
  • [=== CCI Exhaustion Exit ===] InpCCIPeriod = 28 // CCI period (10,1,50)
  • [=== CCI Exhaustion Exit ===] InpCCIPrice = 7 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // CCI applied price
  • [=== CCI Exhaustion Exit ===] InpCCIOverbought = 211.0 // Overbought level (100.0,10.0,300.0)
  • [=== CCI Exhaustion Exit ===] InpCCIOversold = -124.0 // Oversold level (-300.0,10.0,-100.0)
  • [=== CCI Exhaustion Exit ===] InpCCIUseDivergence = true // Detect divergence
  • [=== CCI Exhaustion Exit ===] InpCCIDivergenceBars = 12 // Divergence lookback bars (3,1,20)
  • [=== CCI Exhaustion Exit ===] InpCCICloseProfit = true // Close profitable positions
  • [=== CCI Exhaustion Exit ===] InpCCICloseLoss = false // Close losing positions too
  • [=== CCI Exhaustion Exit ===] InpCCIMinProfitPoints = 100.0 // Min profit to close (0.0,1.0,100.0)
  • [=== MACD Histogram Slope Exit ===] InpEnableMACDSlopeExit = false // Enable MACD slope exit
  • [=== MACD Histogram Slope Exit ===] InpMACDTimeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // MACD timeframe
  • [=== MACD Histogram Slope Exit ===] InpMACDFastEMA = 12 // Fast EMA (5,1,50)
  • [=== MACD Histogram Slope Exit ===] InpMACDSlowEMA = 26 // Slow EMA (10,1,100)
  • [=== MACD Histogram Slope Exit ===] InpMACDSignal = 9 // Signal line (5,1,20)
  • [=== MACD Histogram Slope Exit ===] InpMACDPrice = 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // MACD applied price
  • [=== MACD Histogram Slope Exit ===] InpMACDWatchHistogram = true // Monitor histogram slope
  • [=== MACD Histogram Slope Exit ===] InpMACDSlopeBars = 2 // Bars for slope calculation (1,1,5)
  • [=== MACD Histogram Slope Exit ===] InpMACDWaitZeroCross = false // Wait for zero line cross
  • [=== MACD Histogram Slope Exit ===] InpMACDCloseProfit = true // Close profitable positions
  • [=== MACD Histogram Slope Exit ===] InpMACDCloseLoss = false // Close losing positions too
  • [=== MACD Histogram Slope Exit ===] InpMACDMinProfitPoints = 5.0 // Min profit to close (0.0,1.0,100.0)
  • [=== MACD Histogram Slope Exit ===] InpMACDMinSlopeThreshold = 0.0001 // Min histogram change (0.0,0.00001,0.001)
  • [=== Swing Reversal Exit ===] InpEnableSwingExit = false // Enable swing reversal exit
  • [=== Swing Reversal Exit ===] InpSwingLeftBars = 3 // Left bars for swing (2,1,10)
  • [=== Swing Reversal Exit ===] InpSwingRightBars = 2 // Right bars for swing (1,1,10)
  • [=== Swing Reversal Exit ===] InpSwingMinSize = 20.0 // Min swing size points (5.0,1.0,100.0)
  • [=== Swing Reversal Exit ===] InpSwingPartialClose = true // Close half positions first
  • [=== Swing Reversal Exit ===] InpSwingCloseProfit = true // Close profitable positions
  • [=== Swing Reversal Exit ===] InpSwingCloseLoss = false // Close losing positions too
  • [=== Swing Reversal Exit ===] InpSwingMinProfitPoints = 15.0 // Min profit to close (0.0,1.0,100.0)
  • [=== Swing Reversal Exit ===] InpSwingMaxAge = 3 // Max bars ago for swing (1,1,10)
  • [=== Stochastic Momentum Exit ===] InpEnableStochExit = true // Enable stochastic exit
  • [=== Stochastic Momentum Exit ===] InpStochTimeframe = 5 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Stochastic timeframe
  • [=== Stochastic Momentum Exit ===] InpStochKPeriod = 47 // %K period (5,1,50)
  • [=== Stochastic Momentum Exit ===] InpStochDPeriod = 27 // %D period (2,1,20)
  • [=== Stochastic Momentum Exit ===] InpStochSlowing = 23 // Slowing (1,1,10)
  • [=== Stochastic Momentum Exit ===] InpStochOverbought = 80.0 // Overbought (70.0,5.0,100.0)
  • [=== Stochastic Momentum Exit ===] InpStochOversold = 20.0 // Oversold (0.0,5.0,30.0)
  • [=== Stochastic Momentum Exit ===] InpStochWaitCross = true // Wait for %K/%D crossover
  • [=== Stochastic Momentum Exit ===] InpStochCloseProfit = false // Close profitable positions
  • [=== Stochastic Momentum Exit ===] InpStochCloseLoss = true // Close losing positions too
  • [=== Stochastic Momentum Exit ===] InpStochMinProfitPoints = 26.0 // Min profit to close (0.0,1.0,100.0)
  • [=== Rate of Change (ROC) Exit ===] InpEnableROCExit = false // Enable ROC momentum exit
  • [=== Rate of Change (ROC) Exit ===] InpROCTimeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // ROC timeframe
  • [=== Rate of Change (ROC) Exit ===] InpROCPeriod = 12 // ROC lookback period (5,1,50)
  • [=== Rate of Change (ROC) Exit ===] InpROCThreshold = 0.5 // Min ROC to stay in (0.0,0.1,5.0)
  • [=== Rate of Change (ROC) Exit ===] InpROCWeakBars = 2 // Consecutive weak bars (1,1,5)
  • [=== Rate of Change (ROC) Exit ===] InpROCCloseNewest = false // Close newest positions first
  • [=== Rate of Change (ROC) Exit ===] InpROCCloseProfit = true // Close profitable positions
  • [=== Rate of Change (ROC) Exit ===] InpROCCloseLoss = false // Close losing positions too
  • [=== Rate of Change (ROC) Exit ===] InpROCMinProfitPoints = 0.0 // Min profit to close (0.0,1.0,100.0)
  • [=== Multi-Timeframe Alignment Exit ===] InpEnableMTFExit = false // Enable MTF trend exit
  • [=== Multi-Timeframe Alignment Exit ===] InpMTFTimeframe = 8 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Higher timeframe to monitor
  • [=== Multi-Timeframe Alignment Exit ===] InpMTFMAPeriod = 50 // MA period for trend (20,1,200)
  • [=== Multi-Timeframe Alignment Exit ===] InpMTFMAMethod = MODE_EMA // MA method
  • [=== Multi-Timeframe Alignment Exit ===] InpMTFCloseOnCross = true // Close when price crosses MA
  • [=== Multi-Timeframe Alignment Exit ===] InpMTFPartialExit = true // Close oldest 50% first
  • [=== Multi-Timeframe Alignment Exit ===] InpMTFCloseProfit = true // Close profitable positions
  • [=== Multi-Timeframe Alignment Exit ===] InpMTFCloseLoss = false // Close losing positions too
  • [=== Multi-Timeframe Alignment Exit ===] InpMTFMinProfitPoints = 20.0 // Min profit to close (0.0,1.0,100.0)
  • [=== Parabolic SAR Exit ===] InpEnableSARExit = false // Enable SAR flip exit
  • [=== Parabolic SAR Exit ===] InpSARTimeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // SAR timeframe
  • [=== Parabolic SAR Exit ===] InpSARStep = 0.02 // SAR step (0.01,0.001,0.1)
  • [=== Parabolic SAR Exit ===] InpSARMaximum = 0.2 // SAR maximum (0.1,0.01,0.5)
  • [=== Parabolic SAR Exit ===] InpSARCloseAll = true // Close all positions on flip
  • [=== Parabolic SAR Exit ===] InpSARCloseProfit = true // Close profitable positions
  • [=== Parabolic SAR Exit ===] InpSARCloseLoss = false // Close losing positions too
  • [=== Parabolic SAR Exit ===] InpSARMinProfitPoints = 0.0 // Min profit to close (0.0,1.0,100.0)
  • [=== Trade Settings ===] InpLots = 1.0 // Fixed lot size (0.01,0.01,50.0)
  • [=== Trade Settings ===] InpSlippagePoints = 20 // Max slippage (points) (0,1,100)
  • [=== Trade Settings ===] InpMagicNumber = 22216099 // Magic number (1,1,99999999)
  • [=== Trade Settings ===] InpTradeComment = "Psgrowth.com Expert_16099" // Trade comment for new positions
  • [=== Money Management ===] InpMoneyManagementMode = MM_MODE_PERCENT_RISK // Money management mode
  • [=== Money Management ===] InpRiskPerTradePercent = 5.5 // Risk per trade (% of balance) (0.1,0.1,10.0)
  • [=== Money Management ===] InpLotRoundingMode = LOT_ROUND_NEAREST // Lot rounding mode
  • [=== Risk Management ===] InpStopLossPoints = 200.0 // Initial stop loss (points) (10.0,1.0,5000.0)
  • [=== Risk Management ===] InpTakeProfitPoints = 2000.0 // Initial take profit (points) (10.0,1.0,10000.0)
  • [=== Risk Management ===] InpEnableMarginGuard = true // Enforce minimum margin level before new trades
  • [=== Risk Management ===] InpMinMarginLevelPerc = 240.0 // Minimum margin level (%) (100.0,1.0,1000.0)
  • [=== Trailing Management ===] InpEnableTrailingStop = true // Master toggle for trailing stop management
  • [=== Trailing Management ===] InpTrailingTriggerPts = 550.0 // Trailing stop trigger (points) (5.0,1.0,500.0)
  • [=== Trailing Management ===] InpTrailingStepPts = 20.0 // Trailing stop step (points) (10.0,1.0,2000.0)
  • [=== Break-Even ===] InpEnableBreakEven = true // Move SL to break-even
  • [=== Break-Even ===] InpBreakEvenTrigger = 288.0 // Profit trigger (points) (5.0,1.0,500.0)
  • [=== Break-Even ===] InpBreakEvenOffset = 35.0 // Offset from entry (points) (0.0,1.0,100.0)
  • [=== Lock Profit ===] InpEnableProfitLock = false // Lock profits
  • [=== Lock Profit ===] InpProfitLockIncrement = 500.0 // Lock every X points (10.0,1.0,500.0)
  • [=== Lock Profit ===] InpProfitLockStep = 20.0 // Distance from current price (1.0,1.0,200.0)
  • [=== Additional Trade Controls ===] InpEnableProfitGate = true // Require existing trades be in profit
  • [=== Additional Trade Controls ===] InpProfitGatePoints = 10.0 // Minimum profit (points) per trade (1.0,1.0,500.0)
  • [=== Additional Trade Controls ===] InpMaxOpenPositions = 0 // Maximum open positions (0=unlimited) (0,1,100)
  • [=== Signal Entry Settings ===] InpSignalBarShift = 1 // Signal bar shift (0=current,1=closed)
  • [=== Signal Entry Settings ===] InpMinIndicatorsAgreeForInitialTrades = 2 // Minimum Hulls agreeing for initial entries (1,1,4)
  • [=== Signal Entry Settings ===] InpMinIndicatorsAgreeForAdditonalTrades = 1 // Minimum Hulls agreeing for additional entries (1,1,4)
  • [=== Signal Exit Settings using HULL ===] InpCloseOnOpposite = true // Close trades on opposite agreement if in profit
  • [=== Signal Exit Settings using HULL ===] InpMinIndicatorsAgreeCloseProfit = 3 // Minimum Hulls to close in profit (1,1,4)
  • [=== Signal Exit Settings using HULL ===] InpCloseProfitPoints = 80.0 // Minimum profit (points) to close on opposite (0.0,1.0,200.0)
  • [=== Signal Exit Settings using HULL ===] InpCloseOnOppositeEvenIfInLose = true // Close trades on opposite agreement even if losing
  • [=== Signal Exit Settings using HULL ===] InpMinIndicatorsAgreeCloseLoss = 4 // Minimum Hulls to close even if losing (1,1,4)
  • [=== Signal Stability ===] InpRequireStableSignal = true // Require consensus to persist
  • [=== Signal Stability ===] InpStableBarsRequired = 2 // Consecutive bars with same consensus (1,1,10)
  • [=== Hull 1 Inputs ===] Hull1_Enabled = true // Enable Hull 1
  • [=== Hull 1 Inputs ===] Hull1_Period = 65 // Hull Period (9,1,600)
  • [=== Hull 1 Inputs ===] Hull1_Divisor = 16.5 // Hull Divisor (2.0,0.1,25.0)
  • [=== Hull 1 Inputs ===] Hull1_Price = 7 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // PRICE_AVERAGE
  • [=== Hull 1 Inputs ===] Hull1_Timeframe = 1 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 1 Inputs ===] Hull1_FlatSensitivity = 9.0 // Flat Sensitivity (1.0,0.5,30.0)
  • [=== Hull 1 Inputs ===] Hull1_FlatBars = 69 // Flat Bars (1,1,12)
  • [=== Hull 1 Inputs ===] Hull1_UseAdxFilter = true // ADX filter enabled
  • [=== Hull 1 Inputs ===] Hull1_AdxTimeframe = 1 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 1 Inputs ===] Hull1_AdxPeriod = 6 // ADX Period (7,1,100)
  • [=== Hull 1 Inputs ===] Hull1_AdxThreshold = 70.0 // ADX Threshold (10.0,0.5,70.0)
  • [=== Hull 1 Inputs ===] Hull1_MomentumLookback = 1 // Momentum Lookback (3,1,50)
  • [=== Hull 1 Inputs ===] Hull1_MomentumPoints = 5.0 // Momentum Points (1.0,0.5,50.0)
  • [=== Hull 2 Inputs ===] Hull2_Enabled = true // Enable Hull 2
  • [=== Hull 2 Inputs ===] Hull2_Period = 90 // Hull Period (9,1,600)
  • [=== Hull 2 Inputs ===] Hull2_Divisor = 14.0 // Hull Divisor (2.0,0.1,25.0)
  • [=== Hull 2 Inputs ===] Hull2_Price = 7 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // PRICE_AVERAGE
  • [=== Hull 2 Inputs ===] Hull2_Timeframe = 4 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 2 Inputs ===] Hull2_FlatSensitivity = 0.5 // Flat Sensitivity (1.0,0.5,30.0)
  • [=== Hull 2 Inputs ===] Hull2_FlatBars = 3 // Flat Bars (1,1,50)
  • [=== Hull 2 Inputs ===] Hull2_AdxTimeframe = 6 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 2 Inputs ===] Hull2_AdxPeriod = 82 // ADX Period (7,1,150)
  • [=== Hull 2 Inputs ===] Hull2_AdxThreshold = 68.0 // ADX Threshold (20.0,0.5,100.0)
  • [=== Hull 2 Inputs ===] Hull2_MomentumLookback = 50 // Momentum Lookback (3,1,100)
  • [=== Hull 2 Inputs ===] Hull2_MomentumPoints = 24.0 // Momentum Points (5.0,0.5,70.0)
  • [=== Hull 3 Inputs ===] Hull3_Enabled = true // Enable Hull 3
  • [=== Hull 3 Inputs ===] Hull3_Period = 48 // Hull Period (9,1,600)
  • [=== Hull 3 Inputs ===] Hull3_Divisor = 1.62 // Hull Divisor (2.0,0.1,25.0)
  • [=== Hull 3 Inputs ===] Hull3_Price = 7 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
  • [=== Hull 3 Inputs ===] Hull3_Timeframe = 7 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 3 Inputs ===] Hull3_FlatSensitivity = 2.5 // Flat Sensitivity (1.0,0.5,40.0)
  • [=== Hull 3 Inputs ===] Hull3_FlatBars = 1 // Flat Bars (1,1,20)
  • [=== Hull 3 Inputs ===] Hull3_AdxTimeframe = 5 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 3 Inputs ===] Hull3_AdxPeriod = 101 // ADX Period (7,1,100)
  • [=== Hull 3 Inputs ===] Hull3_AdxThreshold = 84.0 // ADX Threshold (20.0,0.5,80.0)
  • [=== Hull 3 Inputs ===] Hull3_MomentumLookback = 40 // Momentum Lookback (3,1,50)
  • [=== Hull 3 Inputs ===] Hull3_MomentumPoints = 12.0 // Momentum Points (5.0,0.5,100.0)
  • [=== Hull 4 Inputs ===] Hull4_Enabled = true // Enable Hull 4
  • [=== Hull 4 Inputs ===] Hull4_Period = 185 // Hull Period (9,1,1000)
  • [=== Hull 4 Inputs ===] Hull4_Divisor = 14.4 // Hull Divisor (1.0,0.1,40.0)
  • [=== Hull 4 Inputs ===] Hull4_Price = 5 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
  • [=== Hull 4 Inputs ===] Hull4_Timeframe = 7 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 4 Inputs ===] Hull4_FlatSensitivity = 6.0 // Flat Sensitivity (1.0,0.5,40.0)
  • [=== Hull 4 Inputs ===] Hull4_FlatBars = 7 // Flat Bars (1,1,20)
  • [=== Hull 4 Inputs ===] Hull4_AdxTimeframe = 7 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Hull 4 Inputs ===] Hull4_AdxPeriod = 116 // ADX Period (7,1,50)
  • [=== Hull 4 Inputs ===] Hull4_AdxThreshold = 35.0 // ADX Threshold (10.0,0.5,60.0)
  • [=== Hull 4 Inputs ===] Hull4_MomentumLookback = 20 // Momentum Lookback (3,1,50)
  • [=== Hull 4 Inputs ===] Hull4_MomentumPoints = 41.0 // Momentum Points (1.0,0.5,40.0)
  • [=== Jurik Filter 1 Settings ===] InpJurik1_Enabled = false // Enable Jurik Filter 1
  • [=== Jurik Filter 1 Settings ===] InpJurik1_UseForInitialTrades = true // Use for initial trade entries
  • [=== Jurik Filter 1 Settings ===] InpJurik1_UseForAdditionalTrades = true // Use for additional trades (same direction)
  • [=== Jurik Filter 1 Settings ===] InpJurik1_Timeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Jurik Timeframe
  • [=== Jurik Filter 1 Settings ===] InpJurik1_Length = 50 // Jurik Length (1,1,200)
  • [=== Jurik Filter 1 Settings ===] InpJurik1_Phase = 0.0 // Jurik Phase (-100.0,1.0,100.0)
  • [=== Jurik Filter 1 Settings ===] InpJurik1_VolatilityDivisorBase = 10.0 // Volatility Divisor Base (0.1,0.1,50.0)
  • [=== Jurik Filter 1 Settings ===] InpJurik1_VolatilityDivisorMax = 100.0 // Volatility Divisor Max (1.0,1.0,200.0)
  • [=== Jurik Filter 1 Settings ===] InpJurik1_VolumeBarLimit = 10 // Volume Bar Limit (1,1,50)
  • [=== Jurik Filter 1 Settings ===] InpJurik1_AdaptiveFactor = 2.0 // Adaptive Factor (0.1,0.1,10.0)
  • [=== Jurik Filter 1 Settings ===] InpJurik1_AdaptiveMultiplier = 4.0 // Adaptive Multiplier (0.1,0.1,20.0)
  • [=== Jurik Filter 1 Settings ===] InpJurik1_AdaptiveMinLength = 30.0 // Adaptive Min Length (1.0,1.0,100.0)
  • [=== Jurik Filter 1 Settings ===] InpJurik1_BetaFactor = 0.45 // Beta Factor (0.01,0.01,0.99)
  • [=== RSI Confirmation ===] InpEnableRsiConfirmation = true // Require RSI confirmation for entries
  • [=== RSI Confirmation ===] InpRsiTimeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== RSI Confirmation ===] InpRsiPeriod = 41 // RSI Period (5,1,30)
  • [=== RSI Confirmation ===] InpRsiPrice = 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
  • [=== RSI Confirmation ===] InpRsiBuyMin = 36.0 // RSI Buy Min (0.0,1.0,50.0)
  • [=== RSI Confirmation ===] InpRsiBuyMax = 70.0 // RSI Buy Max (50.0,1.0,80.0)
  • [=== RSI Confirmation ===] InpRsiSellMin = 40.0 // RSI Sell Min (20.0,1.0,50.0)
  • [=== RSI Confirmation ===] InpRsiSellMax = 53.0 // RSI Sell Max (70.0,1.0,100.0)
  • [=== Market Correlation Monitor ===] InpEnableCorrelationMonitor = true // Enable correlation monitoring
  • [=== Market Correlation Monitor ===] InpCorrelationBlockEntries = true // Block new entries on correlation breakdown
  • [=== Market Correlation Monitor ===] InpCorrelationClosePositions = false // Close positions when correlation breaks down
  • [=== Market Correlation Monitor ===] InpCorrelationTimeframe = 8 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Correlation timeframe
  • [=== Market Correlation Monitor ===] InpCorrelationLookback = 35 // Bars to evaluate correlation (10,1,500)
  • [=== Market Correlation Monitor ===] InpCorrelationMinThreshold = 0.70 // Minimum absolute correlation allowed (0.1,0.01,0.99)
  • [=== Market Correlation Monitor ===] InpCorrelationDivergenceTrigger = 0.25 // Minimum change to flag breakdown (0.05,0.01,1.0)
  • [=== Market Correlation Monitor ===] InpCorrelationConfirmBars = 1 // Consecutive bars required to confirm breakdown (1,1,10)
  • [=== Market Correlation Monitor ===] InpCorrelationSymbolSuffix = "m" // Broker symbol suffix (auto-appended)
  • [=== Market Correlation Monitor ===] InpCorrWatch_EURUSD = false // Monitor EURUSD correlation
  • [=== Market Correlation Monitor ===] InpCorrWatch_GBPUSD = false // Monitor GBPUSD correlation
  • [=== Market Correlation Monitor ===] InpCorrWatch_AUDUSD = false // Monitor AUDUSD correlation
  • [=== Market Correlation Monitor ===] InpCorrWatch_NZDUSD = false // Monitor NZDUSD correlation
  • [=== Market Correlation Monitor ===] InpCorrWatch_USDJPY = true // Monitor USDJPY correlation
  • [=== Market Correlation Monitor ===] InpCorrWatch_USDCAD = false // Monitor USDCAD correlation
  • [=== Market Correlation Monitor ===] InpCorrWatch_USDCHF = true // Monitor USDCHF correlation
  • [=== Market Correlation Monitor ===] InpCorrWatch_XAUUSD = false // Monitor XAUUSD correlation
  • [=== Bar Range Filter ===] InpEnableBarRangeFilter = false // Require minimum average bar range
  • [=== Bar Range Filter ===] InpBarRangeLookback = 5 // Number of bars to average (2,1,50)
  • [=== Bar Range Filter ===] InpMinBarRangePoints = 50.0 // Minimum average range (points) (1.0,1.0,1000.0)
  • [=== News Filter (First Friday NFP) ===] InpEnableNFPFilter = true // Block trading on first Friday (NFP)
  • [=== News Filter (First Friday NFP) ===] InpNFPStartHour = 8 // NFP release hour (broker time) (0,1,23)
  • [=== News Filter (First Friday NFP) ===] InpNFPStartMinute = 30 // NFP release minute (0,1,59)
  • [=== News Filter (First Friday NFP) ===] InpNFPAvoidMinutesBefore = 30 // Stop trading X min before NFP (5,1,120)
  • [=== News Filter (First Friday NFP) ===] InpNFPAvoidMinutesAfter = 30 // Resume trading X min after NFP (5,1,120)
  • [=== News Filter (First Friday NFP) ===] InpNFPClosePositions = false // Close positions before NFP
  • [=== News Filter (First Friday NFP) ===] InpNFPCloseMinutesBefore = 10 // Close X min before NFP (1,1,60)
  • [=== News Filter (First Friday NFP) ===] InpNFPCloseProfitOnly = true // Only close profitable positions
  • [=== Volatility Filter ===] InpEnableAtrFilter = true // Require minimum ATR
  • [=== Volatility Filter ===] InpAtrTimeframe = 5 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Volatility Filter ===] InpAtrPeriod = 60 // ATR period (5,1,50)
  • [=== Volatility Filter ===] InpAtrAveragePeriod = 185 // ATR average period (10,1,200)
  • [=== Volatility Filter ===] InpAtrMultiplierMin = 0.69 // ATR must be >= average*multiplier (0.5,0.1,5.0)
  • [=== Spread Filter ===] InpEnableSpreadFilter = true // Block trades during wide spreads
  • [=== Spread Filter ===] InpMaxSpreadPoints = 20.0 // Maximum allowed spread (points) (1.0,1.0,200.0)
  • [=== Volume Filter ===] InpEnableVolumeFilter = true // Enable volume filter for entries
  • [=== Volume Filter ===] InpVolumeType = VOLUME_TICK // Volume type to analyze
  • [=== Volume Filter ===] InpVolumeTimeframe = 6 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Volume data timeframe
  • [=== Volume Filter ===] InpVolumeThreshold = 0 // Minimum volume threshold (0=disabled)
  • [=== Volume Filter ===] InpUseVolumeAverage = true // Compare to average volume
  • [=== Volume Filter ===] InpVolumeAvgPeriod = 10 // Volume average period (5,1,100)
  • [=== Volume Filter ===] InpVolumeMultiplier = 0.65 // Volume must be >= average*multiplier (0.1,0.1,5.0)
  • [=== Adaptive Volatility Filter ===] InpAdaptiveVolatilityFilter = false // Enable adaptive volatility filter
  • [=== Adaptive Volatility Filter ===] InpVolatilityPercentileMin = 10.0 // Minimum volatility percentile allowed (0.0,1.0,50.0)
  • [=== Adaptive Volatility Filter ===] InpVolatilityPercentileMax = 90.0 // Maximum volatility percentile allowed (50.0,1.0,100.0)
  • [=== Adaptive Volatility Filter ===] InpVolatilityLookbackBars = 50 // Lookback bars for volatility range (10,1,200)
  • [=== Adaptive Volatility Filter ===] InpAdaptiveStopLoss = false // Enable adaptive SL/TP adjustment
  • [=== Adaptive Volatility Filter ===] InpVolatilityStopMultiplier = 1.0 // SL multiplier for volatility (0.5,0.1,3.0)
  • [=== Adaptive Volatility Filter ===] InpVolatilityTakeMultiplier = 1.0 // TP multiplier for volatility (0.5,0.1,3.0)
  • [=== Trend Quality Filter ===] InpTrendQualityFilter = false // Enable trend quality filter
  • [=== Trend Quality Filter ===] InpMinTrendQuality = 25.0 // Minimum trend quality score (0-100) (0.0,1.0,100.0)
  • [=== Trend Quality Filter ===] InpTrendQualityTimeframes = "CURRENT,H1,H4" // Timeframes to check (comma-separated)
  • [=== Trend Quality Filter ===] InpTrendQualityAdxPeriod = 14 // ADX period for trend quality (5,1,50)
  • [=== Market Noise Filter ===] InpMarketNoiseFilter = false // Enable market noise filter
  • [=== Market Noise Filter ===] InpMinEfficiencyRatio = 0.3 // Minimum efficiency ratio (0.0-1.0) (0.0,0.05,1.0)
  • [=== Market Noise Filter ===] InpEfficiencyLookbackBars = 20 // Lookback bars for efficiency calculation (5,1,100)
  • [=== Adaptive Spread Filter ===] InpAdaptiveSpreadFilter = false // Enable adaptive spread filter
  • [=== Adaptive Spread Filter ===] InpMaxSpreadMultiplier = 2.0 // Max spread vs average (1.0,0.1,5.0)
  • [=== Adaptive Spread Filter ===] InpSpreadAverageBars = 100 // Bars to calculate average spread (10,1,500)
  • [=== Price Action Quality Filter ===] InpPriceActionQualityFilter = false // Enable price action quality filter
  • [=== Price Action Quality Filter ===] InpMaxWickRatio = 0.7 // Max wick/body ratio (0.1,0.05,2.0)
  • [=== Price Action Quality Filter ===] InpPriceActionLookbackBars = 3 // Bars to check for quality (1,1,10)
  • [=== Multi-Timeframe Confirmation ===] InpMTFConfirmation = false // Enable multi-timeframe confirmation
  • [=== Multi-Timeframe Confirmation ===] InpMTFTimeframes = "CURRENT,H1,H4" // Timeframes to confirm (comma-separated)
  • [=== Multi-Timeframe Confirmation ===] InpMTFMinAgree = 2 // Minimum timeframes that must agree (1,1,5)
  • [=== Multi-Timeframe Confirmation ===] InpMTFHullPeriod = 20 // Hull period for MTF (5,1,100)
  • [=== Multi-Timeframe Confirmation ===] InpMTFHullDivisor = 2.0 // Hull divisor for MTF (1.0,0.1,10.0)
  • [=== Momentum Quality Filter ===] InpMomentumQualityFilter = false // Enable momentum quality filter
  • [=== Momentum Quality Filter ===] InpMinMomentumStrength = 0.5 // Minimum momentum strength (0.0,0.1,2.0)
  • [=== Momentum Quality Filter ===] InpMomentumLookbackBars = 10 // Lookback bars for momentum (3,1,50)
  • [=== Daily Drawdown Circuit Breaker ===] InpEnableDailyDrawdownLimit = false // Enable daily drawdown limit
  • [=== Daily Drawdown Circuit Breaker ===] InpMaxDailyDrawdownPercent = 5.0 // Max daily loss (% of balance) (1.0,0.5,20.0)
  • [=== Daily Drawdown Circuit Breaker ===] InpDailyDrawdownAction = 0 // Action: 0=Stop New, 1=Close All, 2=Close Losers
  • [=== Consecutive Loss Limiter ===] InpEnableConsecutiveLossLimit = false // Enable consecutive loss limiter
  • [=== Consecutive Loss Limiter ===] InpMaxConsecutiveLosses = 3 // Max consecutive losses (2,1,10)
  • [=== Consecutive Loss Limiter ===] InpLossLimitPauseHours = 4 // Pause trading hours after limit (1,1,24)
  • [=== Time-of-Day Filter ===] InpEnableTimeOfDayFilter = false // Enable time-of-day filter
  • [=== Time-of-Day Filter ===] InpBlockHour1Start = 0 // Block window 1 start hour (0,1,23)
  • [=== Time-of-Day Filter ===] InpBlockHour1End = 2 // Block window 1 end hour (0,1,23)
  • [=== Time-of-Day Filter ===] InpBlockHour2Start = 11 // Block window 2 start hour (0,1,23)
  • [=== Time-of-Day Filter ===] InpBlockHour2End = 13 // Block window 2 end hour (0,1,23)
  • [=== Time-of-Day Filter ===] InpBlockFriday = true // Block Friday late trading
  • [=== Time-of-Day Filter ===] InpBlockFridayAfterHour = 18 // Block Friday after hour (0,1,23)
  • [=== Equity Curve Filter ===] InpEnableEquityCurveFilter = false // Enable equity curve filter
  • [=== Equity Curve Filter ===] InpMaxDrawdownFromPeak = 15.0 // Max drawdown from peak (%) (5.0,1.0,50.0)
  • [=== Equity Curve Filter ===] InpDrawdownPauseHours = 24 // Pause hours after drawdown (1,1,168)
  • [=== Win Rate Monitor ===] InpEnableWinRateFilter = false // Enable win rate filter
  • [=== Win Rate Monitor ===] InpMinWinRate = 35.0 // Minimum win rate (%) (10.0,5.0,80.0)
  • [=== Win Rate Monitor ===] InpWinRateLookbackTrades = 20 // Lookback trades for win rate (5,1,100)
  • [=== Reversal Detection Exit ===] InpEnableReversalExit = false // Enable reversal exit
  • [=== Reversal Detection Exit ===] InpReversalHullsRequired = 3 // Hulls required for reversal (2,1,4)
  • [=== Reversal Detection Exit ===] InpReversalExitProfitOnly = false // Exit only if in profit
  • [=== Weekend Gap Protection ===] InpEnableWeekendProtection = false // Enable weekend protection
  • [=== Weekend Gap Protection ===] InpWeekendAction = 0 // Action: 0=Close All, 1=Reduce 50%, 2=Do Nothing
  • [=== Weekend Gap Protection ===] InpWeekendCloseHoursFriday = 4 // Hours before Friday close (1,1,12)
  • [=== Weekend Gap Protection ===] InpWeekendCloseProfitOnly = false // Close only profitable positions
  • [=== Profit Scaling Exit ===] InpEnableProfitScaling = false // Enable partial profit taking
  • [=== Profit Scaling Exit ===] InpScalingLevels = 3 // Number of scaling levels (1,1,5)
  • [=== Profit Scaling Exit ===] InpScalingTargets = "50,100,200" // Profit targets (points), comma-separated
  • [=== Profit Scaling Exit ===] InpScalingPercents = "30,30,40" // % to close at each level
  • [=== Position Time Management ===] InpEnableMaxHoldingTime = false // Enable position time limits
  • [=== Position Time Management ===] InpMaxHoldingHours = 24 // Maximum holding time (hours) (1,1,240)
  • [=== Position Time Management ===] InpCloseProfitableOnly = true // Close only profitable positions
  • [=== Position Time Management ===] InpMinProfitThreshold = 0.0 // Profit threshold (points) (0.0,1.0,500.0)
  • [=== Momentum Exit ===] InpEnableMomentumExit = false // Exit on momentum loss
  • [=== Momentum Exit ===] InpMomTimeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Momentum Exit ===] InpMomRsiPeriod = 14 // RSI period for momentum exit (5,1,30)
  • [=== Momentum Exit ===] InpMomRsiOverbought = 70.0 // RSI exit for buys (60.0,1.0,100.0)
  • [=== Momentum Exit ===] InpMomRsiOversold = 30.0 // RSI exit for sells (0.0,1.0,40.0)
  • [=== Momentum Exit ===] InpMomAdxPeriod = 14 // ADX period for exit (7,1,30)
  • [=== Momentum Exit ===] InpMomAdxWeakThreshold = 20.0 // Exit when ADX drops below (5.0,1.0,40.0)
  • [=== Volatility Spike Exit ===] InpEnableVolatilityExit = true // Exit on ATR spike
  • [=== Volatility Spike Exit ===] InpVolExitAtrTimeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== Volatility Spike Exit ===] InpVolExitAtrPeriod = 14 // ATR period (5,1,50)
  • [=== Volatility Spike Exit ===] InpVolExitAtrAvgPeriod = 50 // ATR average period (10,1,200)
  • [=== Volatility Spike Exit ===] InpVolSpikeMultiplier = 2.5 // ATR spike threshold vs avg (1.0,0.1,10.0)
  • [=== Volatility Spike Exit ===] InpVolExitProfitOnly = false // Require profit before ATR spike exit
  • [=== Market Regime Detection ===] InpRegimeDetection = true // Enable Regime Detection
  • [=== Market Regime Detection ===] InpRegimeAdxPeriod = 14 // ADX Period (5,1,50)
  • [=== Market Regime Detection ===] InpRegimeAtrPeriod = 14 // ATR Period (5,1,50)
  • [=== Market Regime Detection ===] InpRegimeAtrAvgPeriod = 20 // ATR Average Period (10,1,100)
  • [=== Market Regime Detection ===] InpRegimeTrendADX = 25.0 // Trending: Min ADX (10.0,1.0,50.0)
  • [=== Market Regime Detection ===] InpRegimeVolatileATR = 1.5 // Volatile: Min ATR Multiplier (1.0,0.1,5.0)
  • [=== Market Regime Detection ===] InpRegimeQuietATR = 0.7 // Quiet: Max ATR Multiplier (0.1,0.1,2.0)
  • [=== Market Regime Detection ===] InpRegimeAdapt = true // Auto-Adjust Strategies per Regime
  • [=== Market Regime Detection ===] InpRegimeConfirmBars = 3 // Bars to confirm regime change (1,1,10)
  • [=== Market Regime Detection ===] InpRegimeExitProfitOnly = true // Only exit profitable positions
  • [=== Market Regime Detection ===] InpRegimeExitMinAge = 5 // Min position age in bars before exit (0,0,100)
  • [=== Trading Sessions Control ===] InpEnableSessionFilters = true // Enable session-based trading
  • [=== Trading Sessions Control ===] InpSessionUtcOffsetHours = 0.0 // Session timezone offset from UTC (-14.0,0.25,14.0)
  • [=== Trading Sessions Control ===] InpSessionAdditionalOffsetMinutes = 0 // Extra manual offset minutes for DST (-180,1,180)
  • [=== Trading Sessions Control ===] InpAsianSessionEnabled = true // Enable trading during Asian session
  • [=== Trading Sessions Control ===] InpAsianSessionStartHour = 4 // Asian session start hour (0,1,23)
  • [=== Trading Sessions Control ===] InpAsianSessionStartMinute = 20 // Asian session start minute (0,1,59)
  • [=== Trading Sessions Control ===] InpAsianSessionEndHour = 19 // Asian session end hour (0,1,23)
  • [=== Trading Sessions Control ===] InpAsianSessionEndMinute = 40 // Asian session end minute (0,1,59)
  • [=== Trading Sessions Control ===] InpEuropeanSessionEnabled = false // Enable trading during European session
  • [=== Trading Sessions Control ===] InpEuropeanSessionStartHour = 4 // European session start hour (0,1,23)
  • [=== Trading Sessions Control ===] InpEuropeanSessionStartMinute = 0 // European session start minute (0,1,59)
  • [=== Trading Sessions Control ===] InpEuropeanSessionEndHour = 17 // European session end hour (0,1,23)
  • [=== Trading Sessions Control ===] InpEuropeanSessionEndMinute = 0 // European session end minute (0,1,59)
  • [=== Trading Sessions Control ===] InpUSSessionEnabled = true // Enable trading during US session
  • [=== Trading Sessions Control ===] InpUSSessionStartHour = 0 // US session start hour (0,1,23)
  • [=== Trading Sessions Control ===] InpUSSessionStartMinute = 0 // US session start minute (0,1,59)
  • [=== Trading Sessions Control ===] InpUSSessionEndHour = 10 // US session end hour (0,1,23)
  • [=== Trading Sessions Control ===] InpUSSessionEndMinute = 0 // US session end minute (0,1,59)
  • [=== Trading Sessions Control ===] InpCustomSessionEnabled = false // Enable trading during custom session
  • [=== Trading Sessions Control ===] InpCustomSessionStartHour = 22 // Custom session start hour (0,1,23)
  • [=== Trading Sessions Control ===] InpCustomSessionStartMinute = 0 // Custom session start minute (0,1,59)
  • [=== Trading Sessions Control ===] InpCustomSessionEndHour = 23 // Custom session end hour (0,1,23)
  • [=== Trading Sessions Control ===] InpCustomSessionEndMinute = 59 // Custom session end minute (0,1,59)
  • [=== Trading Sessions Control ===] InpEnableEndOfDayClose = false // Close all trades at specific time
  • [=== Trading Sessions Control ===] InpEndOfDayCloseHour = 23 // Close hour (0,1,23)
  • [=== Trading Sessions Control ===] InpEndOfDayCloseMinute = 45 // Close minute (0,1,59)
  • [=== Trading Sessions Control ===] InpEndOfDayProfitOnly = false // Only close profitable positions
  • [=== Trading Sessions Control ===] InpEndOfDayBlockNewTrades = true // Block new trades after close time
  • [=== Dashboard Settings ===] InpShowDashboard = false // Display on-chart dashboard
  • [=== Dashboard Settings ===] InpDashboardX = 8 // Dashboard X position (pixels)
  • [=== Dashboard Settings ===] InpDashboardY = 28 // Dashboard Y position (pixels)
  • [=== Dashboard Settings ===] InpDashboardWidth = 360 // Dashboard width (pixels)
  • [=== Dashboard Settings ===] InpDashboardBgColor = clrWhite // Dashboard background color
  • [=== Dashboard Settings ===] InpDashboardBgOpacity = 245 // Dashboard fill opacity (0 transparent, 255 solid) (0,1,255)
  • [=== Dashboard Settings ===] InpDashboardTextColor = clrWhite // Dashboard text color
  • [=== Dashboard Settings ===] InpDashboardAccentColor = clrDodgerBlue // Dashboard header/accent color
  • [=== Chart Visualization ===] InpAttachHullIndicators = false // Show Hull indicator overlays on chart
  • [=== Chart Visualization ===] InpHullIndicatorSubwindow = 1 // Subwindow index for Hull overlays (0=main chart, 1+=subwindows)
  • [=== Chart Visualization ===] InpShowRsiIndicator = false // Display RSI indicator visualization
  • [=== Chart Visualization ===] InpRsiIndicatorSubwindow = 2 // Subwindow index for RSI visualization (1+=subwindows)
  • [=== Chart Visualization ===] InpShowAdxIndicator = false // Display ADX indicator visualization
  • [=== Chart Visualization ===] InpAdxIndicatorSubwindow = 3 // Subwindow index for ADX visualization (1+=subwindows)
  • [=== Chart Visualization ===] InpShowAtrIndicator = false // Display ATR indicator visualization
  • [=== Chart Visualization ===] InpAtrIndicatorSubwindow = 4 // Subwindow index for ATR visualization (1+=subwindows)
  • [=== Choppiness Filter (Market Quality) ===] InpEnableChoppinessFilter = true // Enable choppiness detection and filtering
  • [=== Choppiness Filter (Market Quality) ===] InpChopBlockEntries = true // Block new entries during choppy markets
  • [=== Choppiness Filter (Market Quality) ===] InpChopClosePositions = false // Close positions when choppiness detected
  • [=== Choppiness Filter (Market Quality) ===] InpChopCloseProfitOnly = true // Only close profitable positions on choppiness
  • [=== Choppiness Filter (Market Quality) ===] InpChopMinProfitPoints = 10.0 // Minimum profit (points) to close on chop (0.0,1.0,500.0)
  • [=== Choppiness Filter (Market Quality) ===] InpChopRequireLayers = 1 // Layers required to confirm choppiness (1,1,4)
  • [=== Choppiness Filter (Market Quality) ===] InpChopUseChopIndex = false // Enable Choppiness Index layer
  • [=== Choppiness Filter (Market Quality) ===] InpChopIndexTimeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // CHOP indicator timeframe
  • [=== Choppiness Filter (Market Quality) ===] InpChopIndexPeriod = 134 // CHOP calculation period (10,1,50)
  • [=== Choppiness Filter (Market Quality) ===] InpChopIndexThreshold = 52.5 // Choppy when CHOP > threshold (50.0,1.0,80.0)
  • [=== Choppiness Filter (Market Quality) ===] InpChopUseAdx = true // Enable ADX trend strength layer
  • [=== Choppiness Filter (Market Quality) ===] InpChopAdxTimeframe = 0 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // ADX timeframe
  • [=== Choppiness Filter (Market Quality) ===] InpChopAdxPeriod = 5 // ADX period (7,1,50)
  • [=== Choppiness Filter (Market Quality) ===] InpChopAdxMinTrend = 18.0 // Choppy when ADX < threshold (15.0,1.0,40.0)
  • [=== Choppiness Filter (Market Quality) ===] InpChopUseRangeCompression = true // Enable range compression detection
  • [=== Choppiness Filter (Market Quality) ===] InpChopRangeTimeframe = 7 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Range compression timeframe
  • [=== Choppiness Filter (Market Quality) ===] InpChopRangeLookback = 18 // Bars to compare range compression (3,1,20)
  • [=== Choppiness Filter (Market Quality) ===] InpChopRangeAtrPeriod = 28 // ATR period for range comparison (10,1,50)
  • [=== Choppiness Filter (Market Quality) ===] InpChopRangeCompressionRatio = 0.75 // Choppy when range < ATR*ratio (0.2,0.1,1.0)
  • [=== Choppiness Filter (Market Quality) ===] InpChopUseAdaptiveThresholds = false // Dynamically adjust thresholds based on volatility
  • [=== Choppiness Filter (Market Quality) ===] InpChopAdaptiveAtrPeriod = 50 // ATR period for adaptive scaling (20,1,100)
  • [=== Choppiness Filter (Market Quality) ===] InpChopAdaptiveMultiplier = 1.5 // Volatility multiplier for adaptive mode (0.5,0.1,3.0)
Pseudocode
// Pipsgrowth EX16099 Trend — Execution Flow (from source analysis)
// Family: Trend
// Expert Advisor that trades using four Hull indicators with advanced exit strategies and multi-layer risk management. 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
InpEnableCCIExitfalseEnable CCI exhaustion exit
InpCCITimeframe5Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // CCI timeframe
InpCCIPeriod28CCI period (10,1,50)
InpCCIPrice7Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // CCI applied price
InpCCIOverbought211.0Overbought level (100.0,10.0,300.0)
InpCCIOversold-124.0Oversold level (-300.0,10.0,-100.0)
InpCCIUseDivergencetrueDetect divergence
InpCCIDivergenceBars12Divergence lookback bars (3,1,20)
InpCCICloseProfittrueClose profitable positions
InpCCICloseLossfalseClose losing positions too
InpCCIMinProfitPoints100.0Min profit to close (0.0,1.0,100.0)
InpEnableMACDSlopeExitfalseEnable MACD slope exit
InpMACDTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // MACD timeframe
InpMACDFastEMA12Fast EMA (5,1,50)
InpMACDSlowEMA26Slow EMA (10,1,100)
InpMACDSignal9Signal line (5,1,20)
InpMACDPrice1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // MACD applied price
InpMACDWatchHistogramtrueMonitor histogram slope
InpMACDSlopeBars2Bars for slope calculation (1,1,5)
InpMACDWaitZeroCrossfalseWait for zero line cross
InpMACDCloseProfittrueClose profitable positions
InpMACDCloseLossfalseClose losing positions too
InpMACDMinProfitPoints5.0Min profit to close (0.0,1.0,100.0)
InpMACDMinSlopeThreshold0.0001Min histogram change (0.0,0.00001,0.001)
InpEnableSwingExitfalseEnable swing reversal exit
InpSwingLeftBars3Left bars for swing (2,1,10)
InpSwingRightBars2Right bars for swing (1,1,10)
InpSwingMinSize20.0Min swing size points (5.0,1.0,100.0)
InpSwingPartialClosetrueClose half positions first
InpSwingCloseProfittrueClose profitable positions
InpSwingCloseLossfalseClose losing positions too
InpSwingMinProfitPoints15.0Min profit to close (0.0,1.0,100.0)
InpSwingMaxAge3Max bars ago for swing (1,1,10)
InpEnableStochExittrueEnable stochastic exit
InpStochTimeframe5Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Stochastic timeframe
InpStochKPeriod47%K period (5,1,50)
InpStochDPeriod27%D period (2,1,20)
InpStochSlowing23Slowing (1,1,10)
InpStochOverbought80.0Overbought (70.0,5.0,100.0)
InpStochOversold20.0Oversold (0.0,5.0,30.0)
InpStochWaitCrosstrueWait for %K/%D crossover
InpStochCloseProfitfalseClose profitable positions
InpStochCloseLosstrueClose losing positions too
InpStochMinProfitPoints26.0Min profit to close (0.0,1.0,100.0)
InpEnableROCExitfalseEnable ROC momentum exit
InpROCTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // ROC timeframe
InpROCPeriod12ROC lookback period (5,1,50)
InpROCThreshold0.5Min ROC to stay in (0.0,0.1,5.0)
InpROCWeakBars2Consecutive weak bars (1,1,5)
InpROCCloseNewestfalseClose newest positions first
InpROCCloseProfittrueClose profitable positions
InpROCCloseLossfalseClose losing positions too
InpROCMinProfitPoints0.0Min profit to close (0.0,1.0,100.0)
InpEnableMTFExitfalseEnable MTF trend exit
InpMTFTimeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Higher timeframe to monitor
InpMTFMAPeriod50MA period for trend (20,1,200)
InpMTFMAMethodMODE_EMAMA method
InpMTFCloseOnCrosstrueClose when price crosses MA
InpMTFPartialExittrueClose oldest 50% first
InpMTFCloseProfittrueClose profitable positions
InpMTFCloseLossfalseClose losing positions too
InpMTFMinProfitPoints20.0Min profit to close (0.0,1.0,100.0)
InpEnableSARExitfalseEnable SAR flip exit
InpSARTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // SAR timeframe
InpSARStep0.02SAR step (0.01,0.001,0.1)
InpSARMaximum0.2SAR maximum (0.1,0.01,0.5)
InpSARCloseAlltrueClose all positions on flip
InpSARCloseProfittrueClose profitable positions
InpSARCloseLossfalseClose losing positions too
InpSARMinProfitPoints0.0Min profit to close (0.0,1.0,100.0)
InpLots1.0Fixed lot size (0.01,0.01,50.0)
InpSlippagePoints20Max slippage (points) (0,1,100)
InpMagicNumber22216099Magic number (1,1,99999999)
InpTradeComment"Psgrowth.com Expert_16099"Trade comment for new positions
InpMoneyManagementModeMM_MODE_PERCENT_RISKMoney management mode
InpRiskPerTradePercent5.5Risk per trade (% of balance) (0.1,0.1,10.0)
InpLotRoundingModeLOT_ROUND_NEARESTLot rounding mode
InpStopLossPoints200.0Initial stop loss (points) (10.0,1.0,5000.0)
InpTakeProfitPoints2000.0Initial take profit (points) (10.0,1.0,10000.0)
InpEnableMarginGuardtrueEnforce minimum margin level before new trades
InpMinMarginLevelPerc240.0Minimum margin level (%) (100.0,1.0,1000.0)
InpEnableTrailingStoptrueMaster toggle for trailing stop management
InpTrailingTriggerPts550.0Trailing stop trigger (points) (5.0,1.0,500.0)
InpTrailingStepPts20.0Trailing stop step (points) (10.0,1.0,2000.0)
InpEnableBreakEventrueMove SL to break-even
InpBreakEvenTrigger288.0Profit trigger (points) (5.0,1.0,500.0)
InpBreakEvenOffset35.0Offset from entry (points) (0.0,1.0,100.0)
InpEnableProfitLockfalseLock profits
InpProfitLockIncrement500.0Lock every X points (10.0,1.0,500.0)
InpProfitLockStep20.0Distance from current price (1.0,1.0,200.0)
InpEnableProfitGatetrueRequire existing trades be in profit
InpProfitGatePoints10.0Minimum profit (points) per trade (1.0,1.0,500.0)
InpMaxOpenPositions0Maximum open positions (0=unlimited) (0,1,100)
InpSignalBarShift1Signal bar shift (0=current,1=closed)
InpMinIndicatorsAgreeForInitialTrades2Minimum Hulls agreeing for initial entries (1,1,4)
InpMinIndicatorsAgreeForAdditonalTrades1Minimum Hulls agreeing for additional entries (1,1,4)
InpCloseOnOppositetrueClose trades on opposite agreement if in profit
InpMinIndicatorsAgreeCloseProfit3Minimum Hulls to close in profit (1,1,4)
InpCloseProfitPoints80.0Minimum profit (points) to close on opposite (0.0,1.0,200.0)
InpCloseOnOppositeEvenIfInLosetrueClose trades on opposite agreement even if losing
InpMinIndicatorsAgreeCloseLoss4Minimum Hulls to close even if losing (1,1,4)
InpRequireStableSignaltrueRequire consensus to persist
InpStableBarsRequired2Consecutive bars with same consensus (1,1,10)
Hull1_EnabledtrueEnable Hull 1
Hull1_Period65Hull Period (9,1,600)
Hull1_Divisor16.5Hull Divisor (2.0,0.1,25.0)
Hull1_Price7Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // PRICE_AVERAGE
Hull1_Timeframe1Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull1_FlatSensitivity9.0Flat Sensitivity (1.0,0.5,30.0)
Hull1_FlatBars69Flat Bars (1,1,12)
Hull1_UseAdxFiltertrueADX filter enabled
Hull1_AdxTimeframe1Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull1_AdxPeriod6ADX Period (7,1,100)
Hull1_AdxThreshold70.0ADX Threshold (10.0,0.5,70.0)
Hull1_MomentumLookback1Momentum Lookback (3,1,50)
Hull1_MomentumPoints5.0Momentum Points (1.0,0.5,50.0)
Hull2_EnabledtrueEnable Hull 2
Hull2_Period90Hull Period (9,1,600)
Hull2_Divisor14.0Hull Divisor (2.0,0.1,25.0)
Hull2_Price7Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // PRICE_AVERAGE
Hull2_Timeframe4Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull2_FlatSensitivity0.5Flat Sensitivity (1.0,0.5,30.0)
Hull2_FlatBars3Flat Bars (1,1,50)
Hull2_AdxTimeframe6Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull2_AdxPeriod82ADX Period (7,1,150)
Hull2_AdxThreshold68.0ADX Threshold (20.0,0.5,100.0)
Hull2_MomentumLookback50Momentum Lookback (3,1,100)
Hull2_MomentumPoints24.0Momentum Points (5.0,0.5,70.0)
Hull3_EnabledtrueEnable Hull 3
Hull3_Period48Hull Period (9,1,600)
Hull3_Divisor1.62Hull Divisor (2.0,0.1,25.0)
Hull3_Price7Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
Hull3_Timeframe7Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull3_FlatSensitivity2.5Flat Sensitivity (1.0,0.5,40.0)
Hull3_FlatBars1Flat Bars (1,1,20)
Hull3_AdxTimeframe5Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull3_AdxPeriod101ADX Period (7,1,100)
Hull3_AdxThreshold84.0ADX Threshold (20.0,0.5,80.0)
Hull3_MomentumLookback40Momentum Lookback (3,1,50)
Hull3_MomentumPoints12.0Momentum Points (5.0,0.5,100.0)
Hull4_EnabledtrueEnable Hull 4
Hull4_Period185Hull Period (9,1,1000)
Hull4_Divisor14.4Hull Divisor (1.0,0.1,40.0)
Hull4_Price5Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
Hull4_Timeframe7Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull4_FlatSensitivity6.0Flat Sensitivity (1.0,0.5,40.0)
Hull4_FlatBars7Flat Bars (1,1,20)
Hull4_AdxTimeframe7Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull4_AdxPeriod116ADX Period (7,1,50)
Hull4_AdxThreshold35.0ADX Threshold (10.0,0.5,60.0)
Hull4_MomentumLookback20Momentum Lookback (3,1,50)
Hull4_MomentumPoints41.0Momentum Points (1.0,0.5,40.0)
InpJurik1_EnabledfalseEnable Jurik Filter 1
InpJurik1_UseForInitialTradestrueUse for initial trade entries
InpJurik1_UseForAdditionalTradestrueUse for additional trades (same direction)
InpJurik1_Timeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Jurik Timeframe
InpJurik1_Length50Jurik Length (1,1,200)
InpJurik1_Phase0.0Jurik Phase (-100.0,1.0,100.0)
InpJurik1_VolatilityDivisorBase10.0Volatility Divisor Base (0.1,0.1,50.0)
InpJurik1_VolatilityDivisorMax100.0Volatility Divisor Max (1.0,1.0,200.0)
InpJurik1_VolumeBarLimit10Volume Bar Limit (1,1,50)
InpJurik1_AdaptiveFactor2.0Adaptive Factor (0.1,0.1,10.0)
InpJurik1_AdaptiveMultiplier4.0Adaptive Multiplier (0.1,0.1,20.0)
InpJurik1_AdaptiveMinLength30.0Adaptive Min Length (1.0,1.0,100.0)
InpJurik1_BetaFactor0.45Beta Factor (0.01,0.01,0.99)
InpEnableRsiConfirmationtrueRequire RSI confirmation for entries
InpRsiTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
InpRsiPeriod41RSI Period (5,1,30)
InpRsiPrice1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
InpRsiBuyMin36.0RSI Buy Min (0.0,1.0,50.0)
InpRsiBuyMax70.0RSI Buy Max (50.0,1.0,80.0)
InpRsiSellMin40.0RSI Sell Min (20.0,1.0,50.0)
InpRsiSellMax53.0RSI Sell Max (70.0,1.0,100.0)
InpEnableCorrelationMonitortrueEnable correlation monitoring
InpCorrelationBlockEntriestrueBlock new entries on correlation breakdown
InpCorrelationClosePositionsfalseClose positions when correlation breaks down
InpCorrelationTimeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Correlation timeframe
InpCorrelationLookback35Bars to evaluate correlation (10,1,500)
InpCorrelationMinThreshold0.70Minimum absolute correlation allowed (0.1,0.01,0.99)
InpCorrelationDivergenceTrigger0.25Minimum change to flag breakdown (0.05,0.01,1.0)
InpCorrelationConfirmBars1Consecutive bars required to confirm breakdown (1,1,10)
InpCorrelationSymbolSuffix"m"Broker symbol suffix (auto-appended)
InpCorrWatch_EURUSDfalseMonitor EURUSD correlation
InpCorrWatch_GBPUSDfalseMonitor GBPUSD correlation
InpCorrWatch_AUDUSDfalseMonitor AUDUSD correlation
InpCorrWatch_NZDUSDfalseMonitor NZDUSD correlation
InpCorrWatch_USDJPYtrueMonitor USDJPY correlation
InpCorrWatch_USDCADfalseMonitor USDCAD correlation
InpCorrWatch_USDCHFtrueMonitor USDCHF correlation
InpCorrWatch_XAUUSDfalseMonitor XAUUSD correlation
InpEnableBarRangeFilterfalseRequire minimum average bar range
InpBarRangeLookback5Number of bars to average (2,1,50)
InpMinBarRangePoints50.0Minimum average range (points) (1.0,1.0,1000.0)
InpEnableNFPFiltertrueBlock trading on first Friday (NFP)
InpNFPStartHour8NFP release hour (broker time) (0,1,23)
InpNFPStartMinute30NFP release minute (0,1,59)
InpNFPAvoidMinutesBefore30Stop trading X min before NFP (5,1,120)
InpNFPAvoidMinutesAfter30Resume trading X min after NFP (5,1,120)
InpNFPClosePositionsfalseClose positions before NFP
InpNFPCloseMinutesBefore10Close X min before NFP (1,1,60)
InpNFPCloseProfitOnlytrueOnly close profitable positions
InpEnableAtrFiltertrueRequire minimum ATR
InpAtrTimeframe5Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
InpAtrPeriod60ATR period (5,1,50)
InpAtrAveragePeriod185ATR average period (10,1,200)
InpAtrMultiplierMin0.69ATR must be >= average*multiplier (0.5,0.1,5.0)
InpEnableSpreadFiltertrueBlock trades during wide spreads
InpMaxSpreadPoints20.0Maximum allowed spread (points) (1.0,1.0,200.0)
InpEnableVolumeFiltertrueEnable volume filter for entries
InpVolumeTypeVOLUME_TICKVolume type to analyze
InpVolumeTimeframe6Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Volume data timeframe
InpVolumeThreshold0Minimum volume threshold (0=disabled)
InpUseVolumeAveragetrueCompare to average volume
InpVolumeAvgPeriod10Volume average period (5,1,100)
InpVolumeMultiplier0.65Volume must be >= average*multiplier (0.1,0.1,5.0)
InpAdaptiveVolatilityFilterfalseEnable adaptive volatility filter
InpVolatilityPercentileMin10.0Minimum volatility percentile allowed (0.0,1.0,50.0)
InpVolatilityPercentileMax90.0Maximum volatility percentile allowed (50.0,1.0,100.0)
InpVolatilityLookbackBars50Lookback bars for volatility range (10,1,200)
InpAdaptiveStopLossfalseEnable adaptive SL/TP adjustment
InpVolatilityStopMultiplier1.0SL multiplier for volatility (0.5,0.1,3.0)
InpVolatilityTakeMultiplier1.0TP multiplier for volatility (0.5,0.1,3.0)
InpTrendQualityFilterfalseEnable trend quality filter
InpMinTrendQuality25.0Minimum trend quality score (0-100) (0.0,1.0,100.0)
InpTrendQualityTimeframes"CURRENT,H1,H4"Timeframes to check (comma-separated)
InpTrendQualityAdxPeriod14ADX period for trend quality (5,1,50)
InpMarketNoiseFilterfalseEnable market noise filter
InpMinEfficiencyRatio0.3Minimum efficiency ratio (0.0-1.0) (0.0,0.05,1.0)
InpEfficiencyLookbackBars20Lookback bars for efficiency calculation (5,1,100)
InpAdaptiveSpreadFilterfalseEnable adaptive spread filter
InpMaxSpreadMultiplier2.0Max spread vs average (1.0,0.1,5.0)
InpSpreadAverageBars100Bars to calculate average spread (10,1,500)
InpPriceActionQualityFilterfalseEnable price action quality filter
InpMaxWickRatio0.7Max wick/body ratio (0.1,0.05,2.0)
InpPriceActionLookbackBars3Bars to check for quality (1,1,10)
InpMTFConfirmationfalseEnable multi-timeframe confirmation
InpMTFTimeframes"CURRENT,H1,H4"Timeframes to confirm (comma-separated)
InpMTFMinAgree2Minimum timeframes that must agree (1,1,5)
InpMTFHullPeriod20Hull period for MTF (5,1,100)
InpMTFHullDivisor2.0Hull divisor for MTF (1.0,0.1,10.0)
InpMomentumQualityFilterfalseEnable momentum quality filter
InpMinMomentumStrength0.5Minimum momentum strength (0.0,0.1,2.0)
InpMomentumLookbackBars10Lookback bars for momentum (3,1,50)
InpEnableDailyDrawdownLimitfalseEnable daily drawdown limit
InpMaxDailyDrawdownPercent5.0Max daily loss (% of balance) (1.0,0.5,20.0)
InpDailyDrawdownAction0Action: 0=Stop New, 1=Close All, 2=Close Losers
InpEnableConsecutiveLossLimitfalseEnable consecutive loss limiter
InpMaxConsecutiveLosses3Max consecutive losses (2,1,10)
InpLossLimitPauseHours4Pause trading hours after limit (1,1,24)
InpEnableTimeOfDayFilterfalseEnable time-of-day filter
InpBlockHour1Start0Block window 1 start hour (0,1,23)
InpBlockHour1End2Block window 1 end hour (0,1,23)
InpBlockHour2Start11Block window 2 start hour (0,1,23)
InpBlockHour2End13Block window 2 end hour (0,1,23)
InpBlockFridaytrueBlock Friday late trading
InpBlockFridayAfterHour18Block Friday after hour (0,1,23)
InpEnableEquityCurveFilterfalseEnable equity curve filter
InpMaxDrawdownFromPeak15.0Max drawdown from peak (%) (5.0,1.0,50.0)
InpDrawdownPauseHours24Pause hours after drawdown (1,1,168)
InpEnableWinRateFilterfalseEnable win rate filter
InpMinWinRate35.0Minimum win rate (%) (10.0,5.0,80.0)
InpWinRateLookbackTrades20Lookback trades for win rate (5,1,100)
InpEnableReversalExitfalseEnable reversal exit
InpReversalHullsRequired3Hulls required for reversal (2,1,4)
InpReversalExitProfitOnlyfalseExit only if in profit
InpEnableWeekendProtectionfalseEnable weekend protection
InpWeekendAction0Action: 0=Close All, 1=Reduce 50%, 2=Do Nothing
InpWeekendCloseHoursFriday4Hours before Friday close (1,1,12)
InpWeekendCloseProfitOnlyfalseClose only profitable positions
InpEnableProfitScalingfalseEnable partial profit taking
InpScalingLevels3Number of scaling levels (1,1,5)
InpScalingTargets"50,100,200"Profit targets (points), comma-separated
InpScalingPercents"30,30,40"% to close at each level
InpEnableMaxHoldingTimefalseEnable position time limits
InpMaxHoldingHours24Maximum holding time (hours) (1,1,240)
InpCloseProfitableOnlytrueClose only profitable positions
InpMinProfitThreshold0.0Profit threshold (points) (0.0,1.0,500.0)
InpEnableMomentumExitfalseExit on momentum loss
InpMomTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
InpMomRsiPeriod14RSI period for momentum exit (5,1,30)
InpMomRsiOverbought70.0RSI exit for buys (60.0,1.0,100.0)
InpMomRsiOversold30.0RSI exit for sells (0.0,1.0,40.0)
InpMomAdxPeriod14ADX period for exit (7,1,30)
InpMomAdxWeakThreshold20.0Exit when ADX drops below (5.0,1.0,40.0)
InpEnableVolatilityExittrueExit on ATR spike
InpVolExitAtrTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
InpVolExitAtrPeriod14ATR period (5,1,50)
InpVolExitAtrAvgPeriod50ATR average period (10,1,200)
InpVolSpikeMultiplier2.5ATR spike threshold vs avg (1.0,0.1,10.0)
InpVolExitProfitOnlyfalseRequire profit before ATR spike exit
InpRegimeDetectiontrueEnable Regime Detection
InpRegimeAdxPeriod14ADX Period (5,1,50)
InpRegimeAtrPeriod14ATR Period (5,1,50)
InpRegimeAtrAvgPeriod20ATR Average Period (10,1,100)
InpRegimeTrendADX25.0Trending: Min ADX (10.0,1.0,50.0)
InpRegimeVolatileATR1.5Volatile: Min ATR Multiplier (1.0,0.1,5.0)
InpRegimeQuietATR0.7Quiet: Max ATR Multiplier (0.1,0.1,2.0)
InpRegimeAdapttrueAuto-Adjust Strategies per Regime
InpRegimeConfirmBars3Bars to confirm regime change (1,1,10)
InpRegimeExitProfitOnlytrueOnly exit profitable positions
InpRegimeExitMinAge5Min position age in bars before exit (0,0,100)
InpEnableSessionFilterstrueEnable session-based trading
InpSessionUtcOffsetHours0.0Session timezone offset from UTC (-14.0,0.25,14.0)
InpSessionAdditionalOffsetMinutes0Extra manual offset minutes for DST (-180,1,180)
InpAsianSessionEnabledtrueEnable trading during Asian session
InpAsianSessionStartHour4Asian session start hour (0,1,23)
InpAsianSessionStartMinute20Asian session start minute (0,1,59)
InpAsianSessionEndHour19Asian session end hour (0,1,23)
InpAsianSessionEndMinute40Asian session end minute (0,1,59)
InpEuropeanSessionEnabledfalseEnable trading during European session
InpEuropeanSessionStartHour4European session start hour (0,1,23)
InpEuropeanSessionStartMinute0European session start minute (0,1,59)
InpEuropeanSessionEndHour17European session end hour (0,1,23)
InpEuropeanSessionEndMinute0European session end minute (0,1,59)
InpUSSessionEnabledtrueEnable trading during US session
InpUSSessionStartHour0US session start hour (0,1,23)
InpUSSessionStartMinute0US session start minute (0,1,59)
InpUSSessionEndHour10US session end hour (0,1,23)
InpUSSessionEndMinute0US session end minute (0,1,59)
InpCustomSessionEnabledfalseEnable trading during custom session
InpCustomSessionStartHour22Custom session start hour (0,1,23)
InpCustomSessionStartMinute0Custom session start minute (0,1,59)
InpCustomSessionEndHour23Custom session end hour (0,1,23)
InpCustomSessionEndMinute59Custom session end minute (0,1,59)
InpEnableEndOfDayClosefalseClose all trades at specific time
InpEndOfDayCloseHour23Close hour (0,1,23)
InpEndOfDayCloseMinute45Close minute (0,1,59)
InpEndOfDayProfitOnlyfalseOnly close profitable positions
InpEndOfDayBlockNewTradestrueBlock new trades after close time
InpShowDashboardfalseDisplay on-chart dashboard
InpDashboardX8Dashboard X position (pixels)
InpDashboardY28Dashboard Y position (pixels)
InpDashboardWidth360Dashboard width (pixels)
InpDashboardBgColorclrWhiteDashboard background color
InpDashboardBgOpacity245Dashboard fill opacity (0 transparent, 255 solid) (0,1,255)
InpDashboardTextColorclrWhiteDashboard text color
InpDashboardAccentColorclrDodgerBlueDashboard header/accent color
InpAttachHullIndicatorsfalseShow Hull indicator overlays on chart
InpHullIndicatorSubwindow1Subwindow index for Hull overlays (0=main chart, 1+=subwindows)
InpShowRsiIndicatorfalseDisplay RSI indicator visualization
InpRsiIndicatorSubwindow2Subwindow index for RSI visualization (1+=subwindows)
InpShowAdxIndicatorfalseDisplay ADX indicator visualization
InpAdxIndicatorSubwindow3Subwindow index for ADX visualization (1+=subwindows)
InpShowAtrIndicatorfalseDisplay ATR indicator visualization
InpAtrIndicatorSubwindow4Subwindow index for ATR visualization (1+=subwindows)
InpEnableChoppinessFiltertrueEnable choppiness detection and filtering
InpChopBlockEntriestrueBlock new entries during choppy markets
InpChopClosePositionsfalseClose positions when choppiness detected
InpChopCloseProfitOnlytrueOnly close profitable positions on choppiness
InpChopMinProfitPoints10.0Minimum profit (points) to close on chop (0.0,1.0,500.0)
InpChopRequireLayers1Layers required to confirm choppiness (1,1,4)
InpChopUseChopIndexfalseEnable Choppiness Index layer
InpChopIndexTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // CHOP indicator timeframe
InpChopIndexPeriod134CHOP calculation period (10,1,50)
InpChopIndexThreshold52.5Choppy when CHOP > threshold (50.0,1.0,80.0)
InpChopUseAdxtrueEnable ADX trend strength layer
InpChopAdxTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // ADX timeframe
InpChopAdxPeriod5ADX period (7,1,50)
InpChopAdxMinTrend18.0Choppy when ADX < threshold (15.0,1.0,40.0)
InpChopUseRangeCompressiontrueEnable range compression detection
InpChopRangeTimeframe7Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Range compression timeframe
InpChopRangeLookback18Bars to compare range compression (3,1,20)
InpChopRangeAtrPeriod28ATR period for range comparison (10,1,50)
InpChopRangeCompressionRatio0.75Choppy when range < ATR*ratio (0.2,0.1,1.0)
InpChopUseAdaptiveThresholdsfalseDynamically adjust thresholds based on volatility
InpChopAdaptiveAtrPeriod50ATR period for adaptive scaling (20,1,100)
InpChopAdaptiveMultiplier1.5Volatility multiplier for adaptive mode (0.5,0.1,3.0)
Source Code (.mq5)Open Source
Pipsgrowth_com_EX16099.mq5
#property copyright "Pipsgrowth.com"
#property link      "https://pipsgrowth.com"
#property version   "2.00"
#property strict
#property description "Pipsgrowth.com EX16099 Hull2EA — four Hull indicator trend EA with advanced exit strategies, full 12-layer stack."

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

//+------------------------------------------------------------------+
//|                                                  ExitManager     |
//|                                  Advanced Exit Strategy Manager  |
//|                                   7 Exit Modules for Hull2EA v3  |
//+------------------------------------------------------------------+
// INLINED FROM ExitManager.mqh - DO NOT MODIFY SEPARATELY

//+------------------------------------------------------------------+
//| Input Parameters for All 7 Exit Strategies                       |
//+------------------------------------------------------------------+

//----------------------
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_InpCCITimeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_InpMACDTimeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_InpStochTimeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_InpROCTimeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_InpMTFTimeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_InpSARTimeframe = PERIOD_H1;
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;

Full source code available on download

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

Tags:ex16099trendpipsgrowthfreemt5xauusd

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