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).
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.
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.
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.
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 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
MT5indicators
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):
- [===
CCIExhaustion Exit ===]InpEnableCCIExit=false// EnableCCIexhaustion exit - [===
CCIExhaustion Exit ===]InpCCITimeframe= 5 //Timeframe(1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) //CCItimeframe - [===
CCIExhaustion Exit ===]InpCCIPeriod= 28 //CCIperiod (10,1,50) - [===
CCIExhaustion Exit ===]InpCCIPrice= 7 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) //CCIapplied price - [===
CCIExhaustion Exit ===]InpCCIOverbought=211.0// Overboughtlevel(100.0,10.0,300.0) - [===
CCIExhaustion Exit ===]InpCCIOversold= -124.0// Oversoldlevel(-300.0,10.0,-100.0) - [===
CCIExhaustion Exit ===]InpCCIUseDivergence=true// Detect divergence - [===
CCIExhaustion Exit ===]InpCCIDivergenceBars= 12 // Divergence lookback bars (3,1,20) - [===
CCIExhaustion Exit ===]InpCCICloseProfit=true// Close profitable positions - [===
CCIExhaustion Exit ===]InpCCICloseLoss=false// Close losing positions too - [===
CCIExhaustion Exit ===]InpCCIMinProfitPoints=100.0// Min profit to close (0.0,1.0,100.0) - [===
MACDHistogram Slope Exit ===]InpEnableMACDSlopeExit=false// EnableMACDslope exit - [===
MACDHistogram Slope Exit ===]InpMACDTimeframe= 0 //Timeframe(1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) //MACDtimeframe - [===
MACDHistogram Slope Exit ===]InpMACDFastEMA= 12 // FastEMA(5,1,50) - [===
MACDHistogram Slope Exit ===]InpMACDSlowEMA= 26 // SlowEMA(10,1,100) - [===
MACDHistogram Slope Exit ===]InpMACDSignal= 9 // Signal line (5,1,20) - [===
MACDHistogram Slope Exit ===]InpMACDPrice= 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) //MACDapplied price - [===
MACDHistogram Slope Exit ===]InpMACDWatchHistogram=true// Monitor histogram slope - [===
MACDHistogram Slope Exit ===]InpMACDSlopeBars= 2 // Bars for slope calculation (1,1,5) - [===
MACDHistogram Slope Exit ===]InpMACDWaitZeroCross=false// Wait for zero line cross - [===
MACDHistogram Slope Exit ===]InpMACDCloseProfit=true// Close profitable positions - [===
MACDHistogram Slope Exit ===]InpMACDCloseLoss=false// Close losing positions too - [===
MACDHistogram Slope Exit ===]InpMACDMinProfitPoints=5.0// Min profit to close (0.0,1.0,100.0) - [===
MACDHistogram 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// EnableROCmomentum exit - [=== Rate of
Change(ROC) Exit ===]InpROCTimeframe= 0 //Timeframe(1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) //ROCtimeframe - [=== Rate of
Change(ROC) Exit ===]InpROCPeriod= 12 //ROClookback period (5,1,50) - [=== Rate of
Change(ROC) Exit ===]InpROCThreshold=0.5// MinROCto 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// EnableMTFtrend 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
SARExit ===]InpEnableSARExit=false// EnableSARflip exit - [=== Parabolic
SARExit ===]InpSARTimeframe= 0 //Timeframe(1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) //SARtimeframe - [=== Parabolic
SARExit ===]InpSARStep=0.02//SARstep (0.01,0.001,0.1) - [=== Parabolic
SARExit ===]InpSARMaximum=0.2//SARmaximum (0.1,0.01,0.5) - [=== Parabolic
SARExit ===]InpSARCloseAll=true// Close all positions on flip - [=== Parabolic
SARExit ===]InpSARCloseProfit=true// Close profitable positions - [=== Parabolic
SARExit ===]InpSARCloseLoss=false// Close losing positions too - [=== Parabolic
SARExit ===]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 marginlevelbefore new trades - [=== Risk Management ===]
InpMinMarginLevelPerc=240.0// Minimum marginlevel(%) (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// HullDivisor(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// FlatSensitivity(1.0,0.5,30.0) - [=== Hull 1 Inputs ===] Hull1_FlatBars = 69 // Flat
Bars(1,1,12) - [=== Hull 1 Inputs ===] Hull1_UseAdxFilter =
true//ADXfilter 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 //
ADXPeriod(7,1,100) - [=== Hull 1 Inputs ===] Hull1_AdxThreshold =
70.0//ADXThreshold(10.0,0.5,70.0) - [=== Hull 1 Inputs ===] Hull1_MomentumLookback = 1 // Momentum
Lookback(3,1,50) - [=== Hull 1 Inputs ===] Hull1_MomentumPoints =
5.0// MomentumPoints(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// HullDivisor(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// FlatSensitivity(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 //
ADXPeriod(7,1,150) - [=== Hull 2 Inputs ===] Hull2_AdxThreshold =
68.0//ADXThreshold(20.0,0.5,100.0) - [=== Hull 2 Inputs ===] Hull2_MomentumLookback = 50 // Momentum
Lookback(3,1,100) - [=== Hull 2 Inputs ===] Hull2_MomentumPoints =
24.0// MomentumPoints(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// HullDivisor(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// FlatSensitivity(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 //
ADXPeriod(7,1,100) - [=== Hull 3 Inputs ===] Hull3_AdxThreshold =
84.0//ADXThreshold(20.0,0.5,80.0) - [=== Hull 3 Inputs ===] Hull3_MomentumLookback = 40 // Momentum
Lookback(3,1,50) - [=== Hull 3 Inputs ===] Hull3_MomentumPoints =
12.0// MomentumPoints(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// HullDivisor(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// FlatSensitivity(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 //
ADXPeriod(7,1,50) - [=== Hull 4 Inputs ===] Hull4_AdxThreshold =
35.0//ADXThreshold(10.0,0.5,60.0) - [=== Hull 4 Inputs ===] Hull4_MomentumLookback = 20 // Momentum
Lookback(3,1,50) - [=== Hull 4 Inputs ===] Hull4_MomentumPoints =
41.0// MomentumPoints(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 // JurikLength(1,1,200) - [=== Jurik Filter 1 Settings ===]
InpJurik1_Phase=0.0// JurikPhase(-100.0,1.0,100.0) - [=== Jurik Filter 1 Settings ===]
InpJurik1_VolatilityDivisorBase=10.0// Volatility DivisorBase(0.1,0.1,50.0) - [=== Jurik Filter 1 Settings ===]
InpJurik1_VolatilityDivisorMax=100.0// Volatility DivisorMax(1.0,1.0,200.0) - [=== Jurik Filter 1 Settings ===]
InpJurik1_VolumeBarLimit= 10 // Volume BarLimit(1,1,50) - [=== Jurik Filter 1 Settings ===]
InpJurik1_AdaptiveFactor=2.0// AdaptiveFactor(0.1,0.1,10.0) - [=== Jurik Filter 1 Settings ===]
InpJurik1_AdaptiveMultiplier=4.0// AdaptiveMultiplier(0.1,0.1,20.0) - [=== Jurik Filter 1 Settings ===]
InpJurik1_AdaptiveMinLength=30.0// Adaptive MinLength(1.0,1.0,100.0) - [=== Jurik Filter 1 Settings ===]
InpJurik1_BetaFactor=0.45// BetaFactor(0.01,0.01,0.99) - [===
RSIConfirmation ===]InpEnableRsiConfirmation=true// RequireRSIconfirmation for entries - [===
RSIConfirmation ===]InpRsiTimeframe= 0 //Timeframe(1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) - [===
RSIConfirmation ===]InpRsiPeriod= 41 //RSIPeriod(5,1,30) - [===
RSIConfirmation ===]InpRsiPrice= 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) - [===
RSIConfirmation ===]InpRsiBuyMin=36.0//RSIBuyMin(0.0,1.0,50.0) - [===
RSIConfirmation ===]InpRsiBuyMax=70.0//RSIBuyMax(50.0,1.0,80.0) - [===
RSIConfirmation ===]InpRsiSellMin=40.0//RSISellMin(20.0,1.0,50.0) - [===
RSIConfirmation ===]InpRsiSellMax=53.0//RSISellMax(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// MonitorEURUSDcorrelation - [=== Market Correlation Monitor ===]
InpCorrWatch_GBPUSD=false// MonitorGBPUSDcorrelation - [=== Market Correlation Monitor ===]
InpCorrWatch_AUDUSD=false// MonitorAUDUSDcorrelation - [=== Market Correlation Monitor ===]
InpCorrWatch_NZDUSD=false// MonitorNZDUSDcorrelation - [=== Market Correlation Monitor ===]
InpCorrWatch_USDJPY=true// MonitorUSDJPYcorrelation - [=== Market Correlation Monitor ===]
InpCorrWatch_USDCAD=false// MonitorUSDCADcorrelation - [=== Market Correlation Monitor ===]
InpCorrWatch_USDCHF=true// MonitorUSDCHFcorrelation - [=== Market Correlation Monitor ===]
InpCorrWatch_XAUUSD=false// MonitorXAUUSDcorrelation - [=== 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 FridayNFP) ===]InpEnableNFPFilter=true// Block trading on firstFriday(NFP) - [=== News
Filter(First FridayNFP) ===]InpNFPStartHour= 8 //NFPrelease hour (broker time) (0,1,23) - [=== News
Filter(First FridayNFP) ===]InpNFPStartMinute= 30 //NFPrelease minute (0,1,59) - [=== News
Filter(First FridayNFP) ===]InpNFPAvoidMinutesBefore= 30 // Stop trading X min beforeNFP(5,1,120) - [=== News
Filter(First FridayNFP) ===]InpNFPAvoidMinutesAfter= 30 // Resume trading X min afterNFP(5,1,120) - [=== News
Filter(First FridayNFP) ===]InpNFPClosePositions=false// Close positions beforeNFP - [=== News
Filter(First FridayNFP) ===]InpNFPCloseMinutesBefore= 10 // Close X min beforeNFP(1,1,60) - [=== News
Filter(First FridayNFP) ===]InpNFPCloseProfitOnly=true// Only close profitable positions - [=== Volatility Filter ===]
InpEnableAtrFilter=true// Require minimumATR - [=== Volatility Filter ===]
InpAtrTimeframe= 5 //Timeframe(1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) - [=== Volatility Filter ===]
InpAtrPeriod= 60 //ATRperiod (5,1,50) - [=== Volatility Filter ===]
InpAtrAveragePeriod= 185 //ATRaverage period (10,1,200) - [=== Volatility Filter ===]
InpAtrMultiplierMin=0.69//ATRmust 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 //ADXperiod 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 forMTF(5,1,100) - [=== Multi-Timeframe Confirmation ===]
InpMTFHullDivisor=2.0// Hull divisor forMTF(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 eachlevel - [=== 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 //RSIperiod for momentum exit (5,1,30) - [=== Momentum Exit ===]
InpMomRsiOverbought=70.0//RSIexit for buys (60.0,1.0,100.0) - [=== Momentum Exit ===]
InpMomRsiOversold=30.0//RSIexit for sells (0.0,1.0,40.0) - [=== Momentum Exit ===]
InpMomAdxPeriod= 14 //ADXperiod for exit (7,1,30) - [=== Momentum Exit ===]
InpMomAdxWeakThreshold=20.0// Exit whenADXdrops below (5.0,1.0,40.0) - [=== Volatility Spike Exit ===]
InpEnableVolatilityExit=true// Exit onATRspike - [=== 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 //ATRperiod (5,1,50) - [=== Volatility Spike Exit ===]
InpVolExitAtrAvgPeriod= 50 //ATRaverage period (10,1,200) - [=== Volatility Spike Exit ===]
InpVolSpikeMultiplier=2.5//ATRspike threshold vs avg (1.0,0.1,10.0) - [=== Volatility Spike Exit ===]
InpVolExitProfitOnly=false// Require profit beforeATRspike exit - [=== Market Regime Detection ===]
InpRegimeDetection=true// Enable Regime Detection - [=== Market Regime Detection ===]
InpRegimeAdxPeriod= 14 //ADXPeriod(5,1,50) - [=== Market Regime Detection ===]
InpRegimeAtrPeriod= 14 //ATRPeriod(5,1,50) - [=== Market Regime Detection ===]
InpRegimeAtrAvgPeriod= 20 //ATRAveragePeriod(10,1,100) - [=== Market Regime Detection ===]
InpRegimeTrendADX=25.0// Trending: MinADX(10.0,1.0,50.0) - [=== Market Regime Detection ===]
InpRegimeVolatileATR=1.5// Volatile: MinATRMultiplier(1.0,0.1,5.0) - [=== Market Regime Detection ===]
InpRegimeQuietATR=0.7// Quiet: MaxATRMultiplier(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 fromUTC(-14.0,0.25,14.0) - [=== Trading Sessions Control ===]
InpSessionAdditionalOffsetMinutes= 0 // Extra manual offset minutes forDST(-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// DisplayRSIindicator visualization - [=== Chart Visualization ===]
InpRsiIndicatorSubwindow= 2 // Subwindow index forRSIvisualization (1+=subwindows) - [=== Chart Visualization ===]
InpShowAdxIndicator=false// DisplayADXindicator visualization - [=== Chart Visualization ===]
InpAdxIndicatorSubwindow= 3 // Subwindow index forADXvisualization (1+=subwindows) - [=== Chart Visualization ===]
InpShowAtrIndicator=false// DisplayATRindicator visualization - [=== Chart Visualization ===]
InpAtrIndicatorSubwindow= 4 // Subwindow index forATRvisualization (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) //CHOPindicator timeframe - [=== Choppiness
Filter(Market Quality) ===]InpChopIndexPeriod= 134 //CHOPcalculation period (10,1,50) - [=== Choppiness
Filter(Market Quality) ===]InpChopIndexThreshold=52.5// Choppy whenCHOP> threshold (50.0,1.0,80.0) - [=== Choppiness
Filter(Market Quality) ===]InpChopUseAdx=true// EnableADXtrend strength layer - [=== Choppiness
Filter(Market Quality) ===]InpChopAdxTimeframe= 0 //Timeframe(1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) //ADXtimeframe - [=== Choppiness
Filter(Market Quality) ===]InpChopAdxPeriod= 5 //ADXperiod (7,1,50) - [=== Choppiness
Filter(Market Quality) ===]InpChopAdxMinTrend=18.0// Choppy whenADX< 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 //ATRperiod 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 //ATRperiod for adaptive scaling (20,1,100) - [=== Choppiness
Filter(Market Quality) ===]InpChopAdaptiveMultiplier=1.5// Volatility multiplier for adaptive mode (0.5,0.1,3.0)
// 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
How to Install This EA on MT5
- 1Download the .mq5 file using the button above
- 2Open MetaTrader 5 on your computer
- 3Click File → Open Data Folder in the top menu
- 4Navigate to MQL5 → Experts and paste the .mq5 file there
- 5In MT5, right-click Expert Advisors in the Navigator panel → Refresh
- 6Drag the EA onto an H4 or Daily chart for best results
- 7Configure EMA periods, ADX threshold, and lot size in the dialog
- 8Enable Allow Algo Trading and click OK
EA Parameters
| Parameter | Default | Description |
|---|---|---|
| InpEnableCCIExit | false | Enable CCI exhaustion exit |
| InpCCITimeframe | 5 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // CCI timeframe |
| InpCCIPeriod | 28 | CCI period (10,1,50) |
| InpCCIPrice | 7 | Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // CCI applied price |
| InpCCIOverbought | 211.0 | Overbought level (100.0,10.0,300.0) |
| InpCCIOversold | -124.0 | Oversold level (-300.0,10.0,-100.0) |
| InpCCIUseDivergence | true | Detect divergence |
| InpCCIDivergenceBars | 12 | Divergence lookback bars (3,1,20) |
| InpCCICloseProfit | true | Close profitable positions |
| InpCCICloseLoss | false | Close losing positions too |
| InpCCIMinProfitPoints | 100.0 | Min profit to close (0.0,1.0,100.0) |
| InpEnableMACDSlopeExit | false | Enable MACD slope exit |
| InpMACDTimeframe | 0 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // MACD timeframe |
| InpMACDFastEMA | 12 | Fast EMA (5,1,50) |
| InpMACDSlowEMA | 26 | Slow EMA (10,1,100) |
| InpMACDSignal | 9 | Signal line (5,1,20) |
| InpMACDPrice | 1 | Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // MACD applied price |
| InpMACDWatchHistogram | true | Monitor histogram slope |
| InpMACDSlopeBars | 2 | Bars for slope calculation (1,1,5) |
| InpMACDWaitZeroCross | false | Wait for zero line cross |
| InpMACDCloseProfit | true | Close profitable positions |
| InpMACDCloseLoss | false | Close losing positions too |
| InpMACDMinProfitPoints | 5.0 | Min profit to close (0.0,1.0,100.0) |
| InpMACDMinSlopeThreshold | 0.0001 | Min histogram change (0.0,0.00001,0.001) |
| InpEnableSwingExit | false | Enable swing reversal exit |
| InpSwingLeftBars | 3 | Left bars for swing (2,1,10) |
| InpSwingRightBars | 2 | Right bars for swing (1,1,10) |
| InpSwingMinSize | 20.0 | Min swing size points (5.0,1.0,100.0) |
| InpSwingPartialClose | true | Close half positions first |
| InpSwingCloseProfit | true | Close profitable positions |
| InpSwingCloseLoss | false | Close losing positions too |
| InpSwingMinProfitPoints | 15.0 | Min profit to close (0.0,1.0,100.0) |
| InpSwingMaxAge | 3 | Max bars ago for swing (1,1,10) |
| InpEnableStochExit | true | Enable stochastic exit |
| InpStochTimeframe | 5 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Stochastic timeframe |
| InpStochKPeriod | 47 | %K period (5,1,50) |
| InpStochDPeriod | 27 | %D period (2,1,20) |
| InpStochSlowing | 23 | Slowing (1,1,10) |
| InpStochOverbought | 80.0 | Overbought (70.0,5.0,100.0) |
| InpStochOversold | 20.0 | Oversold (0.0,5.0,30.0) |
| InpStochWaitCross | true | Wait for %K/%D crossover |
| InpStochCloseProfit | false | Close profitable positions |
| InpStochCloseLoss | true | Close losing positions too |
| InpStochMinProfitPoints | 26.0 | Min profit to close (0.0,1.0,100.0) |
| InpEnableROCExit | false | Enable ROC momentum exit |
| InpROCTimeframe | 0 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // ROC timeframe |
| InpROCPeriod | 12 | ROC lookback period (5,1,50) |
| InpROCThreshold | 0.5 | Min ROC to stay in (0.0,0.1,5.0) |
| InpROCWeakBars | 2 | Consecutive weak bars (1,1,5) |
| InpROCCloseNewest | false | Close newest positions first |
| InpROCCloseProfit | true | Close profitable positions |
| InpROCCloseLoss | false | Close losing positions too |
| InpROCMinProfitPoints | 0.0 | Min profit to close (0.0,1.0,100.0) |
| InpEnableMTFExit | false | Enable MTF trend exit |
| InpMTFTimeframe | 8 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Higher timeframe to monitor |
| InpMTFMAPeriod | 50 | MA period for trend (20,1,200) |
| InpMTFMAMethod | MODE_EMA | MA method |
| InpMTFCloseOnCross | true | Close when price crosses MA |
| InpMTFPartialExit | true | Close oldest 50% first |
| InpMTFCloseProfit | true | Close profitable positions |
| InpMTFCloseLoss | false | Close losing positions too |
| InpMTFMinProfitPoints | 20.0 | Min profit to close (0.0,1.0,100.0) |
| InpEnableSARExit | false | Enable SAR flip exit |
| InpSARTimeframe | 0 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // SAR timeframe |
| InpSARStep | 0.02 | SAR step (0.01,0.001,0.1) |
| InpSARMaximum | 0.2 | SAR maximum (0.1,0.01,0.5) |
| InpSARCloseAll | true | Close all positions on flip |
| InpSARCloseProfit | true | Close profitable positions |
| InpSARCloseLoss | false | Close losing positions too |
| InpSARMinProfitPoints | 0.0 | Min profit to close (0.0,1.0,100.0) |
| InpLots | 1.0 | Fixed lot size (0.01,0.01,50.0) |
| InpSlippagePoints | 20 | Max slippage (points) (0,1,100) |
| InpMagicNumber | 22216099 | Magic number (1,1,99999999) |
| InpTradeComment | "Psgrowth.com Expert_16099" | Trade comment for new positions |
| InpMoneyManagementMode | MM_MODE_PERCENT_RISK | Money management mode |
| InpRiskPerTradePercent | 5.5 | Risk per trade (% of balance) (0.1,0.1,10.0) |
| InpLotRoundingMode | LOT_ROUND_NEAREST | Lot rounding mode |
| InpStopLossPoints | 200.0 | Initial stop loss (points) (10.0,1.0,5000.0) |
| InpTakeProfitPoints | 2000.0 | Initial take profit (points) (10.0,1.0,10000.0) |
| InpEnableMarginGuard | true | Enforce minimum margin level before new trades |
| InpMinMarginLevelPerc | 240.0 | Minimum margin level (%) (100.0,1.0,1000.0) |
| InpEnableTrailingStop | true | Master toggle for trailing stop management |
| InpTrailingTriggerPts | 550.0 | Trailing stop trigger (points) (5.0,1.0,500.0) |
| InpTrailingStepPts | 20.0 | Trailing stop step (points) (10.0,1.0,2000.0) |
| InpEnableBreakEven | true | Move SL to break-even |
| InpBreakEvenTrigger | 288.0 | Profit trigger (points) (5.0,1.0,500.0) |
| InpBreakEvenOffset | 35.0 | Offset from entry (points) (0.0,1.0,100.0) |
| InpEnableProfitLock | false | Lock profits |
| InpProfitLockIncrement | 500.0 | Lock every X points (10.0,1.0,500.0) |
| InpProfitLockStep | 20.0 | Distance from current price (1.0,1.0,200.0) |
| InpEnableProfitGate | true | Require existing trades be in profit |
| InpProfitGatePoints | 10.0 | Minimum profit (points) per trade (1.0,1.0,500.0) |
| InpMaxOpenPositions | 0 | Maximum open positions (0=unlimited) (0,1,100) |
| InpSignalBarShift | 1 | Signal bar shift (0=current,1=closed) |
| InpMinIndicatorsAgreeForInitialTrades | 2 | Minimum Hulls agreeing for initial entries (1,1,4) |
| InpMinIndicatorsAgreeForAdditonalTrades | 1 | Minimum Hulls agreeing for additional entries (1,1,4) |
| InpCloseOnOpposite | true | Close trades on opposite agreement if in profit |
| InpMinIndicatorsAgreeCloseProfit | 3 | Minimum Hulls to close in profit (1,1,4) |
| InpCloseProfitPoints | 80.0 | Minimum profit (points) to close on opposite (0.0,1.0,200.0) |
| InpCloseOnOppositeEvenIfInLose | true | Close trades on opposite agreement even if losing |
| InpMinIndicatorsAgreeCloseLoss | 4 | Minimum Hulls to close even if losing (1,1,4) |
| InpRequireStableSignal | true | Require consensus to persist |
| InpStableBarsRequired | 2 | Consecutive bars with same consensus (1,1,10) |
| Hull1_Enabled | true | Enable Hull 1 |
| Hull1_Period | 65 | Hull Period (9,1,600) |
| Hull1_Divisor | 16.5 | Hull Divisor (2.0,0.1,25.0) |
| Hull1_Price | 7 | Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // PRICE_AVERAGE |
| Hull1_Timeframe | 1 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) |
| Hull1_FlatSensitivity | 9.0 | Flat Sensitivity (1.0,0.5,30.0) |
| Hull1_FlatBars | 69 | Flat Bars (1,1,12) |
| Hull1_UseAdxFilter | true | ADX filter enabled |
| Hull1_AdxTimeframe | 1 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) |
| Hull1_AdxPeriod | 6 | ADX Period (7,1,100) |
| Hull1_AdxThreshold | 70.0 | ADX Threshold (10.0,0.5,70.0) |
| Hull1_MomentumLookback | 1 | Momentum Lookback (3,1,50) |
| Hull1_MomentumPoints | 5.0 | Momentum Points (1.0,0.5,50.0) |
| Hull2_Enabled | true | Enable Hull 2 |
| Hull2_Period | 90 | Hull Period (9,1,600) |
| Hull2_Divisor | 14.0 | Hull Divisor (2.0,0.1,25.0) |
| Hull2_Price | 7 | Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // PRICE_AVERAGE |
| Hull2_Timeframe | 4 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) |
| Hull2_FlatSensitivity | 0.5 | Flat Sensitivity (1.0,0.5,30.0) |
| Hull2_FlatBars | 3 | Flat Bars (1,1,50) |
| Hull2_AdxTimeframe | 6 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) |
| Hull2_AdxPeriod | 82 | ADX Period (7,1,150) |
| Hull2_AdxThreshold | 68.0 | ADX Threshold (20.0,0.5,100.0) |
| Hull2_MomentumLookback | 50 | Momentum Lookback (3,1,100) |
| Hull2_MomentumPoints | 24.0 | Momentum Points (5.0,0.5,70.0) |
| Hull3_Enabled | true | Enable Hull 3 |
| Hull3_Period | 48 | Hull Period (9,1,600) |
| Hull3_Divisor | 1.62 | Hull Divisor (2.0,0.1,25.0) |
| Hull3_Price | 7 | Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) |
| Hull3_Timeframe | 7 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) |
| Hull3_FlatSensitivity | 2.5 | Flat Sensitivity (1.0,0.5,40.0) |
| Hull3_FlatBars | 1 | Flat Bars (1,1,20) |
| Hull3_AdxTimeframe | 5 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) |
| Hull3_AdxPeriod | 101 | ADX Period (7,1,100) |
| Hull3_AdxThreshold | 84.0 | ADX Threshold (20.0,0.5,80.0) |
| Hull3_MomentumLookback | 40 | Momentum Lookback (3,1,50) |
| Hull3_MomentumPoints | 12.0 | Momentum Points (5.0,0.5,100.0) |
| Hull4_Enabled | true | Enable Hull 4 |
| Hull4_Period | 185 | Hull Period (9,1,1000) |
| Hull4_Divisor | 14.4 | Hull Divisor (1.0,0.1,40.0) |
| Hull4_Price | 5 | Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) |
| Hull4_Timeframe | 7 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) |
| Hull4_FlatSensitivity | 6.0 | Flat Sensitivity (1.0,0.5,40.0) |
| Hull4_FlatBars | 7 | Flat Bars (1,1,20) |
| Hull4_AdxTimeframe | 7 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) |
| Hull4_AdxPeriod | 116 | ADX Period (7,1,50) |
| Hull4_AdxThreshold | 35.0 | ADX Threshold (10.0,0.5,60.0) |
| Hull4_MomentumLookback | 20 | Momentum Lookback (3,1,50) |
| Hull4_MomentumPoints | 41.0 | Momentum Points (1.0,0.5,40.0) |
| InpJurik1_Enabled | false | Enable Jurik Filter 1 |
| InpJurik1_UseForInitialTrades | true | Use for initial trade entries |
| InpJurik1_UseForAdditionalTrades | true | Use for additional trades (same direction) |
| InpJurik1_Timeframe | 0 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Jurik Timeframe |
| InpJurik1_Length | 50 | Jurik Length (1,1,200) |
| InpJurik1_Phase | 0.0 | Jurik Phase (-100.0,1.0,100.0) |
| InpJurik1_VolatilityDivisorBase | 10.0 | Volatility Divisor Base (0.1,0.1,50.0) |
| InpJurik1_VolatilityDivisorMax | 100.0 | Volatility Divisor Max (1.0,1.0,200.0) |
| InpJurik1_VolumeBarLimit | 10 | Volume Bar Limit (1,1,50) |
| InpJurik1_AdaptiveFactor | 2.0 | Adaptive Factor (0.1,0.1,10.0) |
| InpJurik1_AdaptiveMultiplier | 4.0 | Adaptive Multiplier (0.1,0.1,20.0) |
| InpJurik1_AdaptiveMinLength | 30.0 | Adaptive Min Length (1.0,1.0,100.0) |
| InpJurik1_BetaFactor | 0.45 | Beta Factor (0.01,0.01,0.99) |
| InpEnableRsiConfirmation | true | Require RSI confirmation for entries |
| InpRsiTimeframe | 0 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) |
| InpRsiPeriod | 41 | RSI Period (5,1,30) |
| InpRsiPrice | 1 | Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) |
| InpRsiBuyMin | 36.0 | RSI Buy Min (0.0,1.0,50.0) |
| InpRsiBuyMax | 70.0 | RSI Buy Max (50.0,1.0,80.0) |
| InpRsiSellMin | 40.0 | RSI Sell Min (20.0,1.0,50.0) |
| InpRsiSellMax | 53.0 | RSI Sell Max (70.0,1.0,100.0) |
| InpEnableCorrelationMonitor | true | Enable correlation monitoring |
| InpCorrelationBlockEntries | true | Block new entries on correlation breakdown |
| InpCorrelationClosePositions | false | Close positions when correlation breaks down |
| InpCorrelationTimeframe | 8 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Correlation timeframe |
| InpCorrelationLookback | 35 | Bars to evaluate correlation (10,1,500) |
| InpCorrelationMinThreshold | 0.70 | Minimum absolute correlation allowed (0.1,0.01,0.99) |
| InpCorrelationDivergenceTrigger | 0.25 | Minimum change to flag breakdown (0.05,0.01,1.0) |
| InpCorrelationConfirmBars | 1 | Consecutive bars required to confirm breakdown (1,1,10) |
| InpCorrelationSymbolSuffix | "m" | Broker symbol suffix (auto-appended) |
| InpCorrWatch_EURUSD | false | Monitor EURUSD correlation |
| InpCorrWatch_GBPUSD | false | Monitor GBPUSD correlation |
| InpCorrWatch_AUDUSD | false | Monitor AUDUSD correlation |
| InpCorrWatch_NZDUSD | false | Monitor NZDUSD correlation |
| InpCorrWatch_USDJPY | true | Monitor USDJPY correlation |
| InpCorrWatch_USDCAD | false | Monitor USDCAD correlation |
| InpCorrWatch_USDCHF | true | Monitor USDCHF correlation |
| InpCorrWatch_XAUUSD | false | Monitor XAUUSD correlation |
| InpEnableBarRangeFilter | false | Require minimum average bar range |
| InpBarRangeLookback | 5 | Number of bars to average (2,1,50) |
| InpMinBarRangePoints | 50.0 | Minimum average range (points) (1.0,1.0,1000.0) |
| InpEnableNFPFilter | true | Block trading on first Friday (NFP) |
| InpNFPStartHour | 8 | NFP release hour (broker time) (0,1,23) |
| InpNFPStartMinute | 30 | NFP release minute (0,1,59) |
| InpNFPAvoidMinutesBefore | 30 | Stop trading X min before NFP (5,1,120) |
| InpNFPAvoidMinutesAfter | 30 | Resume trading X min after NFP (5,1,120) |
| InpNFPClosePositions | false | Close positions before NFP |
| InpNFPCloseMinutesBefore | 10 | Close X min before NFP (1,1,60) |
| InpNFPCloseProfitOnly | true | Only close profitable positions |
| InpEnableAtrFilter | true | Require minimum ATR |
| InpAtrTimeframe | 5 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) |
| InpAtrPeriod | 60 | ATR period (5,1,50) |
| InpAtrAveragePeriod | 185 | ATR average period (10,1,200) |
| InpAtrMultiplierMin | 0.69 | ATR must be >= average*multiplier (0.5,0.1,5.0) |
| InpEnableSpreadFilter | true | Block trades during wide spreads |
| InpMaxSpreadPoints | 20.0 | Maximum allowed spread (points) (1.0,1.0,200.0) |
| InpEnableVolumeFilter | true | Enable volume filter for entries |
| InpVolumeType | VOLUME_TICK | Volume type to analyze |
| InpVolumeTimeframe | 6 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Volume data timeframe |
| InpVolumeThreshold | 0 | Minimum volume threshold (0=disabled) |
| InpUseVolumeAverage | true | Compare to average volume |
| InpVolumeAvgPeriod | 10 | Volume average period (5,1,100) |
| InpVolumeMultiplier | 0.65 | Volume must be >= average*multiplier (0.1,0.1,5.0) |
| InpAdaptiveVolatilityFilter | false | Enable adaptive volatility filter |
| InpVolatilityPercentileMin | 10.0 | Minimum volatility percentile allowed (0.0,1.0,50.0) |
| InpVolatilityPercentileMax | 90.0 | Maximum volatility percentile allowed (50.0,1.0,100.0) |
| InpVolatilityLookbackBars | 50 | Lookback bars for volatility range (10,1,200) |
| InpAdaptiveStopLoss | false | Enable adaptive SL/TP adjustment |
| InpVolatilityStopMultiplier | 1.0 | SL multiplier for volatility (0.5,0.1,3.0) |
| InpVolatilityTakeMultiplier | 1.0 | TP multiplier for volatility (0.5,0.1,3.0) |
| InpTrendQualityFilter | false | Enable trend quality filter |
| InpMinTrendQuality | 25.0 | Minimum trend quality score (0-100) (0.0,1.0,100.0) |
| InpTrendQualityTimeframes | "CURRENT,H1,H4" | Timeframes to check (comma-separated) |
| InpTrendQualityAdxPeriod | 14 | ADX period for trend quality (5,1,50) |
| InpMarketNoiseFilter | false | Enable market noise filter |
| InpMinEfficiencyRatio | 0.3 | Minimum efficiency ratio (0.0-1.0) (0.0,0.05,1.0) |
| InpEfficiencyLookbackBars | 20 | Lookback bars for efficiency calculation (5,1,100) |
| InpAdaptiveSpreadFilter | false | Enable adaptive spread filter |
| InpMaxSpreadMultiplier | 2.0 | Max spread vs average (1.0,0.1,5.0) |
| InpSpreadAverageBars | 100 | Bars to calculate average spread (10,1,500) |
| InpPriceActionQualityFilter | false | Enable price action quality filter |
| InpMaxWickRatio | 0.7 | Max wick/body ratio (0.1,0.05,2.0) |
| InpPriceActionLookbackBars | 3 | Bars to check for quality (1,1,10) |
| InpMTFConfirmation | false | Enable multi-timeframe confirmation |
| InpMTFTimeframes | "CURRENT,H1,H4" | Timeframes to confirm (comma-separated) |
| InpMTFMinAgree | 2 | Minimum timeframes that must agree (1,1,5) |
| InpMTFHullPeriod | 20 | Hull period for MTF (5,1,100) |
| InpMTFHullDivisor | 2.0 | Hull divisor for MTF (1.0,0.1,10.0) |
| InpMomentumQualityFilter | false | Enable momentum quality filter |
| InpMinMomentumStrength | 0.5 | Minimum momentum strength (0.0,0.1,2.0) |
| InpMomentumLookbackBars | 10 | Lookback bars for momentum (3,1,50) |
| InpEnableDailyDrawdownLimit | false | Enable daily drawdown limit |
| InpMaxDailyDrawdownPercent | 5.0 | Max daily loss (% of balance) (1.0,0.5,20.0) |
| InpDailyDrawdownAction | 0 | Action: 0=Stop New, 1=Close All, 2=Close Losers |
| InpEnableConsecutiveLossLimit | false | Enable consecutive loss limiter |
| InpMaxConsecutiveLosses | 3 | Max consecutive losses (2,1,10) |
| InpLossLimitPauseHours | 4 | Pause trading hours after limit (1,1,24) |
| InpEnableTimeOfDayFilter | false | Enable time-of-day filter |
| InpBlockHour1Start | 0 | Block window 1 start hour (0,1,23) |
| InpBlockHour1End | 2 | Block window 1 end hour (0,1,23) |
| InpBlockHour2Start | 11 | Block window 2 start hour (0,1,23) |
| InpBlockHour2End | 13 | Block window 2 end hour (0,1,23) |
| InpBlockFriday | true | Block Friday late trading |
| InpBlockFridayAfterHour | 18 | Block Friday after hour (0,1,23) |
| InpEnableEquityCurveFilter | false | Enable equity curve filter |
| InpMaxDrawdownFromPeak | 15.0 | Max drawdown from peak (%) (5.0,1.0,50.0) |
| InpDrawdownPauseHours | 24 | Pause hours after drawdown (1,1,168) |
| InpEnableWinRateFilter | false | Enable win rate filter |
| InpMinWinRate | 35.0 | Minimum win rate (%) (10.0,5.0,80.0) |
| InpWinRateLookbackTrades | 20 | Lookback trades for win rate (5,1,100) |
| InpEnableReversalExit | false | Enable reversal exit |
| InpReversalHullsRequired | 3 | Hulls required for reversal (2,1,4) |
| InpReversalExitProfitOnly | false | Exit only if in profit |
| InpEnableWeekendProtection | false | Enable weekend protection |
| InpWeekendAction | 0 | Action: 0=Close All, 1=Reduce 50%, 2=Do Nothing |
| InpWeekendCloseHoursFriday | 4 | Hours before Friday close (1,1,12) |
| InpWeekendCloseProfitOnly | false | Close only profitable positions |
| InpEnableProfitScaling | false | Enable partial profit taking |
| InpScalingLevels | 3 | Number of scaling levels (1,1,5) |
| InpScalingTargets | "50,100,200" | Profit targets (points), comma-separated |
| InpScalingPercents | "30,30,40" | % to close at each level |
| InpEnableMaxHoldingTime | false | Enable position time limits |
| InpMaxHoldingHours | 24 | Maximum holding time (hours) (1,1,240) |
| InpCloseProfitableOnly | true | Close only profitable positions |
| InpMinProfitThreshold | 0.0 | Profit threshold (points) (0.0,1.0,500.0) |
| InpEnableMomentumExit | false | Exit on momentum loss |
| InpMomTimeframe | 0 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) |
| InpMomRsiPeriod | 14 | RSI period for momentum exit (5,1,30) |
| InpMomRsiOverbought | 70.0 | RSI exit for buys (60.0,1.0,100.0) |
| InpMomRsiOversold | 30.0 | RSI exit for sells (0.0,1.0,40.0) |
| InpMomAdxPeriod | 14 | ADX period for exit (7,1,30) |
| InpMomAdxWeakThreshold | 20.0 | Exit when ADX drops below (5.0,1.0,40.0) |
| InpEnableVolatilityExit | true | Exit on ATR spike |
| InpVolExitAtrTimeframe | 0 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) |
| InpVolExitAtrPeriod | 14 | ATR period (5,1,50) |
| InpVolExitAtrAvgPeriod | 50 | ATR average period (10,1,200) |
| InpVolSpikeMultiplier | 2.5 | ATR spike threshold vs avg (1.0,0.1,10.0) |
| InpVolExitProfitOnly | false | Require profit before ATR spike exit |
| InpRegimeDetection | true | Enable Regime Detection |
| InpRegimeAdxPeriod | 14 | ADX Period (5,1,50) |
| InpRegimeAtrPeriod | 14 | ATR Period (5,1,50) |
| InpRegimeAtrAvgPeriod | 20 | ATR Average Period (10,1,100) |
| InpRegimeTrendADX | 25.0 | Trending: Min ADX (10.0,1.0,50.0) |
| InpRegimeVolatileATR | 1.5 | Volatile: Min ATR Multiplier (1.0,0.1,5.0) |
| InpRegimeQuietATR | 0.7 | Quiet: Max ATR Multiplier (0.1,0.1,2.0) |
| InpRegimeAdapt | true | Auto-Adjust Strategies per Regime |
| InpRegimeConfirmBars | 3 | Bars to confirm regime change (1,1,10) |
| InpRegimeExitProfitOnly | true | Only exit profitable positions |
| InpRegimeExitMinAge | 5 | Min position age in bars before exit (0,0,100) |
| InpEnableSessionFilters | true | Enable session-based trading |
| InpSessionUtcOffsetHours | 0.0 | Session timezone offset from UTC (-14.0,0.25,14.0) |
| InpSessionAdditionalOffsetMinutes | 0 | Extra manual offset minutes for DST (-180,1,180) |
| InpAsianSessionEnabled | true | Enable trading during Asian session |
| InpAsianSessionStartHour | 4 | Asian session start hour (0,1,23) |
| InpAsianSessionStartMinute | 20 | Asian session start minute (0,1,59) |
| InpAsianSessionEndHour | 19 | Asian session end hour (0,1,23) |
| InpAsianSessionEndMinute | 40 | Asian session end minute (0,1,59) |
| InpEuropeanSessionEnabled | false | Enable trading during European session |
| InpEuropeanSessionStartHour | 4 | European session start hour (0,1,23) |
| InpEuropeanSessionStartMinute | 0 | European session start minute (0,1,59) |
| InpEuropeanSessionEndHour | 17 | European session end hour (0,1,23) |
| InpEuropeanSessionEndMinute | 0 | European session end minute (0,1,59) |
| InpUSSessionEnabled | true | Enable trading during US session |
| InpUSSessionStartHour | 0 | US session start hour (0,1,23) |
| InpUSSessionStartMinute | 0 | US session start minute (0,1,59) |
| InpUSSessionEndHour | 10 | US session end hour (0,1,23) |
| InpUSSessionEndMinute | 0 | US session end minute (0,1,59) |
| InpCustomSessionEnabled | false | Enable trading during custom session |
| InpCustomSessionStartHour | 22 | Custom session start hour (0,1,23) |
| InpCustomSessionStartMinute | 0 | Custom session start minute (0,1,59) |
| InpCustomSessionEndHour | 23 | Custom session end hour (0,1,23) |
| InpCustomSessionEndMinute | 59 | Custom session end minute (0,1,59) |
| InpEnableEndOfDayClose | false | Close all trades at specific time |
| InpEndOfDayCloseHour | 23 | Close hour (0,1,23) |
| InpEndOfDayCloseMinute | 45 | Close minute (0,1,59) |
| InpEndOfDayProfitOnly | false | Only close profitable positions |
| InpEndOfDayBlockNewTrades | true | Block new trades after close time |
| InpShowDashboard | false | Display on-chart dashboard |
| InpDashboardX | 8 | Dashboard X position (pixels) |
| InpDashboardY | 28 | Dashboard Y position (pixels) |
| InpDashboardWidth | 360 | Dashboard width (pixels) |
| InpDashboardBgColor | clrWhite | Dashboard background color |
| InpDashboardBgOpacity | 245 | Dashboard fill opacity (0 transparent, 255 solid) (0,1,255) |
| InpDashboardTextColor | clrWhite | Dashboard text color |
| InpDashboardAccentColor | clrDodgerBlue | Dashboard header/accent color |
| InpAttachHullIndicators | false | Show Hull indicator overlays on chart |
| InpHullIndicatorSubwindow | 1 | Subwindow index for Hull overlays (0=main chart, 1+=subwindows) |
| InpShowRsiIndicator | false | Display RSI indicator visualization |
| InpRsiIndicatorSubwindow | 2 | Subwindow index for RSI visualization (1+=subwindows) |
| InpShowAdxIndicator | false | Display ADX indicator visualization |
| InpAdxIndicatorSubwindow | 3 | Subwindow index for ADX visualization (1+=subwindows) |
| InpShowAtrIndicator | false | Display ATR indicator visualization |
| InpAtrIndicatorSubwindow | 4 | Subwindow index for ATR visualization (1+=subwindows) |
| InpEnableChoppinessFilter | true | Enable choppiness detection and filtering |
| InpChopBlockEntries | true | Block new entries during choppy markets |
| InpChopClosePositions | false | Close positions when choppiness detected |
| InpChopCloseProfitOnly | true | Only close profitable positions on choppiness |
| InpChopMinProfitPoints | 10.0 | Minimum profit (points) to close on chop (0.0,1.0,500.0) |
| InpChopRequireLayers | 1 | Layers required to confirm choppiness (1,1,4) |
| InpChopUseChopIndex | false | Enable Choppiness Index layer |
| InpChopIndexTimeframe | 0 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // CHOP indicator timeframe |
| InpChopIndexPeriod | 134 | CHOP calculation period (10,1,50) |
| InpChopIndexThreshold | 52.5 | Choppy when CHOP > threshold (50.0,1.0,80.0) |
| InpChopUseAdx | true | Enable ADX trend strength layer |
| InpChopAdxTimeframe | 0 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // ADX timeframe |
| InpChopAdxPeriod | 5 | ADX period (7,1,50) |
| InpChopAdxMinTrend | 18.0 | Choppy when ADX < threshold (15.0,1.0,40.0) |
| InpChopUseRangeCompression | true | Enable range compression detection |
| InpChopRangeTimeframe | 7 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Range compression timeframe |
| InpChopRangeLookback | 18 | Bars to compare range compression (3,1,20) |
| InpChopRangeAtrPeriod | 28 | ATR period for range comparison (10,1,50) |
| InpChopRangeCompressionRatio | 0.75 | Choppy when range < ATR*ratio (0.2,0.1,1.0) |
| InpChopUseAdaptiveThresholds | false | Dynamically adjust thresholds based on volatility |
| InpChopAdaptiveAtrPeriod | 50 | ATR period for adaptive scaling (20,1,100) |
| InpChopAdaptiveMultiplier | 1.5 | Volatility multiplier for adaptive mode (0.5,0.1,3.0) |
#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.
Clear Warning: Educational Purposes Only
Clear Warning: This Expert Advisor is for educational and testing purposes only. Do NOT use it with real money. Test only on demo accounts. Trading with real money involves substantial risk of capital loss. This does not constitute investment advice.
Recommended Brokers for This EA
These EAs run on MT5 — use a regulated broker with fast execution and tight spreads
Markets.com
Exness
IC Markets
Similar Expert Advisors
View All Expert AdvisorsMore Trend Following strategy EAs from our library
Pipsgrowth EX16080 Trend
Pipsgrowth.com EX16080 EURUSDTrendFollower — triple-EMA H4 trend follower, full 12-layer stack.
Pipsgrowth EX16081 Trend
Pipsgrowth.com EX16081 GoldTrendEA — XAUUSD H4 EMA cross with Fib targets, full 12-layer stack.
Pipsgrowth EX16033 Trend
Pipsgrowth.com EX16033 EA_Price_Action — price-action grid scalper, full 12-layer stack.
Community
Educational purposes only. Do NOT use with real money. Test on demo accounts only.