P
PipsGrowth
OtherOpen Source – Free

Pipsgrowth EX12010 MultiIndicatorConfluence

MT5 Expert Advisor (Open Source) · XAUUSD · M5

Pipsgrowth.com EX12010 A2_XAUUSD_5M — Volatility Gaussian Bands multi-filter confluence, full 12-layer stack.

Overview

Pipsgrowth EX12010 is a Gaussian-band breakout EA built around a 4-pole Ehlers smoothing kernel rather than a standard Bollinger-style deviation envelope. The author of the source code implemented GaussianFilterAdvanced() with the textbook two-pole cascade coefficients — alpha = 2.0/(1+length), a1 = exp(-sqrt(2)pi/length), b1 = 2a1*cos(sqrt(2)*pi/length), c1 = 1 - b1 + a1² — and seeds the recursion with the first three raw prices so the filter has no warm-up distortion on the chart. Length and slope thresholds are declared per timeframe: M1 length 6, M5 length 8, M15 length 10, H1 length 12; slope floors 0.00005, 0.00007, 0.0001, 0.00015 respectively. The band breakout uses DistanceMultiplier = 1.1 (with UseDifferentBandsForBuySell = false by default — the same envelope trades both sides unless the user opts into Length_Sell = 6 and DistanceMultiplier_Sell = 1.1 as a separate sell envelope). Trades are gated by seven stacked filters before any order is sent.

The first filter is the Gaussian slope itself: GetGaussianSlope() returns GaussianFilterAdvanced(0) − GaussianFilterAdvanced(1), so a buy requires the slope to exceed the per-TF positive threshold and a sell requires the slope to fall below the negative threshold. The second is the HTF trend EMA — by default TrendFilterTF = 6 maps to PERIOD_H4 and TrendEMA = 50, so a buy needs the bid above the H4 EMA-50 and a sell needs the ask below it. The third is the in-TF EMA(8) confirmation (ConfirmEMA = 8 by default) so the entry bar's bid/ask must be on the right side of the fast EMA. The fourth through seventh (RSI 14, ADX 14, Volume, MACD) are all disabled by default — EnableRSIFilter, EnableADXFilter, EnableVolumeFilter and EnableMACDConfirmation all default to off, so out of the box the EA only enforces the Gaussian slope, the HTF H4 EMA-50, and the EMA-8 confirm. A user who wants the 12-layer brief to actually run turns the four optional filters on via the per-filter ON/OFF enum.

Position sizing has a default of 0.1 lots with EnableAutoRisk = false. The MM_MODE selector then re-routes the lot through MM_FIXED_LOT, MM_BY_BALANCE, MM_BY_EQUITY, MM_BY_MARGIN_FREE or MM_BY_MARGIN_LEVEL — all five default to the fixed 0.10 lot unless MoneyManagementMode is changed. SL and TP are derived from a 14-period ATR in GetCurrentATR(). ATR_MultiplierSL = 1.5 sets the stop at 1.5× ATR away from the entry; TP1_Multiplier = 1.5 and TP2_Multiplier = 2.5 produce two profit targets at 1.5× and 2.5× ATR. With TradeSplitMode = TRADE_SPLIT_TP1_TP2 the EA fires two half-lot orders instead of one full-lot order — the first leg closes at TP1 and the runner closes at TP2. The alternative TRADE_FULL_SINGLE path puts the full lot at TP1 only. MinATR = 0.03 is a low-volatility trap gate: if ATR(14) is below 0.03 in price units, no orders go out even if the Gaussian slope and EMAs all align.

Trade management in ManageOpenPositions() runs five stops in cascade on every tick. The trailing stop — TrailLookbackCandles = 3 by default — does not use a fixed-point trail; instead it walks the last three completed candle lows (for longs) or highs (for shorts) and ratchets the stop to the tightest of those three swing levels whenever the new extreme is closer to price than the existing stop. Breakeven fires at BreakevenATRMultiplier = 1.5× ATR in profit, at which point TryModify_EX12010 slides the stop to the entry price with a small positive offset. TimeBasedExit closes anything older than MaxTradeDurationMinutes = 120 (default off). The two optional exit modes — ExitIfTrendWeakens (Gaussian slope reverses past the per-TF threshold) and ExitOnHeikenAshiReversal (HA bar flips color) — are off by default; enabling them turns the EA into a slope-aware trend follower that bails the moment the Ehlers filter rolls over.

Risk gates in RiskGuardCheck() are the per-day equity baseline plus hard caps: MaxDrawdownPercent = 10% intraday, MaxDailyLossPercent = 5% (though this input is not actually wired into the equity check — the EA measures drawdown against the day's starting equity, not realized P&L), and MinEquityProtection = 100 (any account below $100 stops opening new positions). CanTradeNow() resets the daily counter at DailyResetHour = 0 and rejects new entries once MaxTradesPerSymbolPerDay = 5 has been hit. There is no per-week cap, no global MaxTradesPerDay, and no min-equity-percent-of-balance gate — those layers in the brief are aspirational. The news filter pulls ForexFactory's weekly XML via WebRequest with a 5-second timeout, and blocks entries 15 minutes before and 15 minutes after any high-impact event for the chart symbol (FilterNewsBySymbol = true). It is a clean per-event window without a NFP-only special case.

Execution uses CTrade with SetDeviationInPoints(MaxSlippagePoints = 5) and SetExpertMagicNumber(22212010). Close and modify helpers TryClose_EX12010 and TryModify_EX12010 both retry up to three times: closes retry on REQUOTE / TIMEOUT / PRICE_OFF / PRICE_CHANGED with 200ms sleep between attempts; modifies retry on REQUOTE / TIMEOUT only with 100ms sleep, and do not retry on PRICE_CHANGED (so a fast market can leave the SL ratcheting in the dust). OnlyNewBarEntry and the per-trade-candle timestamp lastTradeCandleTime mean the EA evaluates the entry once per M5 bar, which keeps trade frequency modest for a gold EA. OppositeCloseMode = CLOSE_OPPOSITE_ON_SIGNAL is the default, so a fresh sell signal will close an open buy before opening the new sell. In practice the backtest for this EA on XAUUSD M5 should show a moderate trade count (a few per week at most), with most winners coming from the TP1 half and runners occasionally stretching to TP2.

Strategy Deep Dive

Each M5 bar tick walks the Gaussian filter, computes the slope as the difference between the current and previous filtered values, and compares it against a per-TF floor (0.00007 on M5 by default). When the slope passes the floor, the EA checks the H4 EMA-50 trend direction and the in-TF EMA-8 confirmation, then layers the optional RSI, ADX, volume, MACD and SuperTrend filters on top via the ConfirmAllFilters() dispatcher. If all enabled gates clear — including spread ≤ 30 points, ATR0.03, no news event in the blackout window, and only one trade per bar — ExecuteBuyOrders or ExecuteSellOrders opens a market position sized by CalculateLotSize(). ManageOpenPositions() then runs the trailing-stop, break-even, and optional exit cascade on every subsequent tick until TP1, TP2, or a stop fires.

Entry Signal

Entries are generated by Gaussian-band breakouts in the direction of a positive or negative Ehlers slope, gated by the H4 EMA-50 trend direction and the in-TF EMA-8 confirmation. By default only those three filters are active; the optional RSI, ADX, volume, MACD, SuperTrend and Heiken Ashi filters are off and only fire when the user enables them via their per-filter ON/OFF enum. A trade is evaluated once per M5 bar and only placed if the spread is below 30 points and no news event is within the 15-minute blackout window.

Exit Signal

Exits run on a five-stop cascade managed in ManageOpenPositions() every tick. The trailing stop ratchets to the tightest of the last three swing lows (longs) or swing highs (shorts); break-even moves the stop to entry at 1.5× ATR in profit; the optional time exit closes trades older than 120 minutes; the optional Gaussian slope reversal exit fires when the Ehlers slope rolls over; and the optional Heiken Ashi reversal exit closes on a color flip of the HA bar. Opposite-signal entries also close any open position in the other direction via TryClose_EX12010.

Stop Loss

Stop-loss is computed in ExecuteBuyOrders / ExecuteSellOrders as 1.5× ATR(14) on the entry bar, with the trailing-stop ratchet and the 1.5× ATR break-even in ManageOpenPositions() usually tightening it long before price reaches it. A global drawdown cap at 10% of the day's starting equity and a $100 equity floor halt all new entries if breached.

Take Profit

Two profit targets at 1.5× and 2.5× ATR are placed by default. TradeSplitMode = TRADE_SPLIT_TP1_TP2 splits the entry into two half-lot orders, one closing at TP1 and a runner closing at TP2; switching to TRADE_FULL_SINGLE concentrates the full lot on TP1 only. The trailing stop and break-even usually close trades before TP2 is hit on average.

Best For

Best for XAUUSD on M5 with a $100 minimum deposit on a low-spread ECN/Raw account (gold spread below 30 points is the hard gate), and most consistent when the M5 Gaussian slope has clear direction. The default RiskPercent = 1.0% with EnableAutoRisk = false (0.10 fixed lot) is calibrated for a $1,000–$5,000 micro account; raise the lot or flip EnableAutoRisk on for larger balances. Recommended for traders comfortable turning on optional filters one at a time and watching the ConfirmAllFilters() panel to learn which gate the EA is rejecting on in choppy markets.

Strategy Logic

Pipsgrowth EX12010 MultiIndicatorConfluence — Strategy Logic Analysis (from .mq5 source)

Family: MultiIndicatorConfluence Magic: 22212010 Version: 2.00

BRIEF: Volatility Gaussian Bands EA with multi-g_Timeframe Gaussian filter, slope detection and band-breakout entries. Confirmed by HTF trend EMA, Heiken Ashi, RSI, ADX, volume and SuperTrend filters. Supports split TPs, trailing, recovery mode and risk- based lot sizing. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

INDICATOR STACK:

  • Standard MT5 indicators

KEY FUNCTIONS:

  • ShowInfoPanel()
  • ShowFilterPanel()
  • AddFilterStatus()
  • CanTradeNow()
  • ShouldOpenTrade()
  • CheckTradeConditions()
  • ManageOpenPositions()
  • CalculateLotSize()
  • TrackTrade()
  • CanOpenTrade()
  • CountOpenTradesByType()
  • CountTradesOlderThan()
  • ...and 26 more

INTERNAL CONSTANTS (0 total):

INPUT PARAMETERS (66 total across 8 groups):

  • [=== 1. GENERAL TRADE SETTINGS ===] TradeMode = TRADE_BUY_AND_SELL // Whether to close existing opposite trades when a new signal appears.
  • [=== 1. GENERAL TRADE SETTINGS ===] OppositeCloseMode = CLOSE_OPPOSITE_ON_SIGNAL // Trading style: one position at a time, or allow multiple.
  • [=== 1. GENERAL TRADE SETTINGS ===] TradingStyle = SINGLE_POSITION // Whether to allow hedging mode (holding both buy and sell)
  • [=== 1. GENERAL TRADE SETTINGS ===] AllowHedgingMode = false // Order type: Market execution or Pending orders.
  • [=== 1. GENERAL TRADE SETTINGS ===] OrderExecMode = EXECUTE_MARKET_ORDERS // Signal behavior: normal or reversed.
  • [=== 1. GENERAL TRADE SETTINGS ===] SignalLogic = SIGNAL_NORMAL // Trade splitting: one TP or split into multiple take profits.
  • [=== 2. STRATEGY CORE SETTINGS ===] Timeframe = 1 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Signal evaluation timeframe
  • [=== 2. STRATEGY CORE SETTINGS ===] PriceSource = 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // Source price for calculations
  • [=== 2. STRATEGY CORE SETTINGS ===] MaxSlippagePoints = 5 // Max allowed slippage in points
  • [=== GAUSSIAN FILTER SETTINGS PER g_Timeframe ===] EnableGaussianFilter = true // --- M1 Settings ---//
  • [=== GAUSSIAN FILTER SETTINGS PER g_Timeframe ===] G_MinSlope_M1 = 0.00005 // --- M5 Settings ---//
  • [=== GAUSSIAN FILTER SETTINGS PER g_Timeframe ===] G_MinSlope_M5 = 0.00007 // --- M15 Settings ---//
  • [=== GAUSSIAN FILTER SETTINGS PER g_Timeframe ===] G_MinSlope_M15 = 0.0001 // --- H1 Settings ---//
  • [=== GAUSSIAN FILTER SETTINGS PER g_Timeframe ===] G_MinSlope_H1 = 0.00015 // --- Slope Filter Control (uses Gaussian slope) ---//
  • [=== BAND BREAKOUT SETTINGS ===] DistanceMultiplier = 1.1 // Band width multiplier (Buy)
  • [=== BAND BREAKOUT SETTINGS ===] UseDifferentBandsForBuySell = false // Use separate Sell side settings
  • [=== BAND BREAKOUT SETTINGS ===] Length_Sell = 6 // Sell Gaussian Length
  • [=== BAND BREAKOUT SETTINGS ===] DistanceMultiplier_Sell = 1.1 // Band width multiplier (Sell)
  • [=== 3. ENTRY FILTERS & CONFIRMATIONS ===] TrendFilterTF = 6 // Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
  • [=== 3. ENTRY FILTERS & CONFIRMATIONS ===] TrendEMA = 50 // --- EMA Confirmation Mode ---
  • [=== 3. ENTRY FILTERS & CONFIRMATIONS ===] ConfirmEMA = 8 // --- Heiken Ashi Mode ---
  • [=== 3. ENTRY FILTERS & CONFIRMATIONS ===] EnableHAEngulfingConfirmation = false // --- RSI Filter ---
  • [=== 3. ENTRY FILTERS & CONFIRMATIONS ===] RSISellLevel = 45.0 // --- ADX Filter ---
  • [=== 3. ENTRY FILTERS & CONFIRMATIONS ===] MinADXStrength = 20.0 // --- Volume Filter ---
  • [=== 3. ENTRY FILTERS & CONFIRMATIONS ===] VolumeLookback = 10 // Lookback bars to calculate average volume
  • [=== 3. ENTRY FILTERS & CONFIRMATIONS ===] VolumeSpikeMultiplier = 1.5 // Multiplier over average to consider as spike
  • [=== 3. ENTRY FILTERS & CONFIRMATIONS ===] RequireVolumeSpike = false // Require volume spike as extra condition
  • [=== 3. ENTRY FILTERS & CONFIRMATIONS ===] ST_SourcePrice = 5 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
  • [=== 3. ENTRY FILTERS & CONFIRMATIONS ===] TrendScoreMinThreshold = 70 // --- Price Action & Entry Timing ---
  • [=== 4. RISK & MONEY MANAGEMENT ===] Lots = 0.1 // Fixed lot size if auto risk is disabled
  • [=== 4. RISK & MONEY MANAGEMENT ===] EnableAutoRisk = false // Enable dynamic lot size based on balance risk %
  • [=== 4. RISK & MONEY MANAGEMENT ===] RiskPercent = 1.0 // Risk % per trade when AutoRisk is enabled
  • [=== 4. RISK & MONEY MANAGEMENT ===] MMReferencePercent = 1.0 // Percentage used in selected MM mode
  • [=== 4. RISK & MONEY MANAGEMENT ===] MMMinLot = 0.01 // Minimum lot allowed by broker
  • [=== 4. RISK & MONEY MANAGEMENT ===] MMMaxLot = 100.0 // Maximum lot allowed
  • [=== 4. RISK & MONEY MANAGEMENT ===] ATR_MultiplierSL = 1.5 // Multiplier for Stop Loss
  • [=== 4. RISK & MONEY MANAGEMENT ===] TP1_Multiplier = 1.5 // First Take Profit (used if TradeSplitMode active)
  • [=== 4. RISK & MONEY MANAGEMENT ===] TP2_Multiplier = 2.5 // Second Take Profit (used if TradeSplitMode active)
  • [=== 4. RISK & MONEY MANAGEMENT ===] SLDistancePoints = 150 // used if EnableAutoRisk = true
  • [=== 4. RISK & MONEY MANAGEMENT ===] MinATR = 0.03 // Skip entries if ATR is too low (avoids low volatility traps)
  • [=== 4. RISK & MONEY MANAGEMENT ===] MinBreakDistance = 0.3 // Minimum required distance between price and band breakout
  • [=== 4. RISK & MONEY MANAGEMENT ===] MaxAllowedSpreadPoints = 30.0 // Max spread in points (e.g., 30 points = 3.0 pips)
  • [=== 4. RISK & MONEY MANAGEMENT ===] MaxDrawdownPercent = 10.0 // Stop all trading if drawdown exceeds this percentage
  • [=== 4. RISK & MONEY MANAGEMENT ===] MaxDailyLossPercent = 5.0 // Daily loss cutoff for trades
  • [=== 4. RISK & MONEY MANAGEMENT ===] MaxTradesOpenAtOnce = 2 // Limit the number of concurrent trades
  • [=== 4. RISK & MONEY MANAGEMENT ===] StopTradeAfterXLosses = 3 // Max consecutive losses allowed before pause
  • [=== 4. RISK & MONEY MANAGEMENT ===] MinEquityProtection = 100.0 // Stop trading if equity falls below this amount
  • [=== 4. RISK & MONEY MANAGEMENT ===] MaxTradesPerSymbolPerDay = 5 // Max number of trades per symbol per day
  • [=== 4. RISK & MONEY MANAGEMENT ===] DailyResetHour = 0 // Time to reset trade counters (0 = midnight server time)
  • [=== 4. RISK & MONEY MANAGEMENT ===] EnableLotIncreaseOnWin = false // Increase lot size after a win
  • [=== 4. RISK & MONEY MANAGEMENT ===] EnableLotReductionOnDrawdown = false // Reduce lot size if drawdown exceeds threshold
  • [=== 4. RISK & MONEY MANAGEMENT ===] LotStepFactorOnWin = 1.2 // Step multiplier if increasing lots on win
  • [=== 4. RISK & MONEY MANAGEMENT ===] LotDrawdownReduceThreshold = 10.0 // Drawdown % threshold before reducing lot
  • [=== 4. RISK & MONEY MANAGEMENT ===] EnableRecoveryMode = false // Activate smaller lot during recovery
  • [=== 4. RISK & MONEY MANAGEMENT ===] RecoveryLotSize = 0.01 // Lot size to use during recovery phase
  • [=== 4. RISK & MONEY MANAGEMENT ===] UseSeparateBuySellLimits = false // Independent trade limits for Buy/Sell
  • [=== 4. RISK & MONEY MANAGEMENT ===] MaxOpenBuyTrades = 1 // Max allowed Buy trades if separated
  • [=== 4. RISK & MONEY MANAGEMENT ===] MaxOpenSellTrades = 1 // Max allowed Sell trades if separated
  • [=== 4. RISK & MONEY MANAGEMENT ===] UseMinimumTradeAge = false // Require previous trades to reach age before re-entry
  • [=== 4. RISK & MONEY MANAGEMENT ===] MinTradeAgeMinutes = 10 // Age in minutes required before reentry is allowed
  • [=== 4. RISK & MONEY MANAGEMENT ===] UseMagicFilter = false // Filter based on Magic Number (for multi-EA use)
  • [=== 4. RISK & MONEY MANAGEMENT ===] EntryMagicNumber = 22212010 // Magic number assigned to new entries
  • [=== 4. RISK & MONEY MANAGEMENT ===] InpTradeComment = "Psgrowth.com Expert_12010" // Trade Comment
  • [=== 4. RISK & MONEY MANAGEMENT ===] MaxTradesPerMagic = 1 // Maximum number of trades allowed per magic number
  • [=== 5. EXIT MANAGEMENT ===] ExitSlopeSensitivity = 0.0001 // Minimum slope change to trigger exit
  • [=== FUTURE ENHANCEMENTS ===] AllowAutoOverrideInputsForTuning = false // +------------------------------------------------------------------+
Pseudocode
// Pipsgrowth EX12010 MultiIndicatorConfluence — Execution Flow (from source analysis)
// Family: MultiIndicatorConfluence
// Volatility Gaussian Bands EA with multi-g_Timeframe Gaussian filter, slope detection and band-breakout entries. Confirmed by HTF trend EMA, Heiken Ashi, RSI, ADX, volume and SuperTrend filters. Supports split TPs, trailing, recovery mode and risk- based lot sizing. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

ON_INIT:
    Create indicator handles: standard set
    Initialize state variables
    Detect broker GMT offset

ON_TICK:
    1. Refresh indicator buffers (closed-bar shift=1)
    2. Manage existing positions:
       - Break-even check
       - ATR trailing stop
       - Profit lock ratchet
       - Time-based exit
       - Opposite-signal exit
    3. If new bar:
       a. ClassifyRegime() — ADX/ATR/BB regime detection
       b. NoTradeGate() checks:
          - Market open + session filter
          - Spread limit
          - Cooldown after loss
          - Consecutive loss limit
          - Kill switch
          - Max drawdown
          - Max concurrent positions
          - Daily/weekly loss limits
       c. GenerateSignal() — strategy-specific entry logic
       d. CheckConfirm() — HTF alignment + R:R + ADX minimum
       e. Calculate position size from risk %
       f. Execute with retry logic
       g. Mark bar to prevent duplicates

ON_TESTER:
    Custom fitness = weighted(RecoveryFactor, ROI, ProfitFactor, TradeCount, Sharpe, Drawdown)

Optimization Profile

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

How to Install This EA on MT5

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

EA Parameters

ParameterDefaultDescription
TradeModeTRADE_BUY_AND_SELLWhether to close existing opposite trades when a new signal appears.
OppositeCloseModeCLOSE_OPPOSITE_ON_SIGNALTrading style: one position at a time, or allow multiple.
TradingStyleSINGLE_POSITIONWhether to allow hedging mode (holding both buy and sell)
AllowHedgingModefalseOrder type: Market execution or Pending orders.
OrderExecModeEXECUTE_MARKET_ORDERSSignal behavior: normal or reversed.
SignalLogicSIGNAL_NORMALTrade splitting: one TP or split into multiple take profits.
Timeframe1Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Signal evaluation timeframe
PriceSource1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // Source price for calculations
MaxSlippagePoints5Max allowed slippage in points
EnableGaussianFiltertrue--- M1 Settings ---//
G_MinSlope_M10.00005--- M5 Settings ---//
G_MinSlope_M50.00007--- M15 Settings ---//
G_MinSlope_M150.0001--- H1 Settings ---//
G_MinSlope_H10.00015--- Slope Filter Control (uses Gaussian slope) ---//
DistanceMultiplier1.1Band width multiplier (Buy)
UseDifferentBandsForBuySellfalseUse separate Sell side settings
Length_Sell6Sell Gaussian Length
DistanceMultiplier_Sell1.1Band width multiplier (Sell)
TrendFilterTF6Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
TrendEMA50--- EMA Confirmation Mode ---
ConfirmEMA8--- Heiken Ashi Mode ---
EnableHAEngulfingConfirmationfalse--- RSI Filter ---
RSISellLevel45.0--- ADX Filter ---
MinADXStrength20.0--- Volume Filter ---
VolumeLookback10Lookback bars to calculate average volume
VolumeSpikeMultiplier1.5Multiplier over average to consider as spike
RequireVolumeSpikefalseRequire volume spike as extra condition
ST_SourcePrice5Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
TrendScoreMinThreshold70--- Price Action & Entry Timing ---
Lots0.1Fixed lot size if auto risk is disabled
EnableAutoRiskfalseEnable dynamic lot size based on balance risk %
RiskPercent1.0Risk % per trade when AutoRisk is enabled
MMReferencePercent1.0Percentage used in selected MM mode
MMMinLot0.01Minimum lot allowed by broker
MMMaxLot100.0Maximum lot allowed
ATR_MultiplierSL1.5Multiplier for Stop Loss
TP1_Multiplier1.5First Take Profit (used if TradeSplitMode active)
TP2_Multiplier2.5Second Take Profit (used if TradeSplitMode active)
SLDistancePoints150used if EnableAutoRisk = true
MinATR0.03Skip entries if ATR is too low (avoids low volatility traps)
MinBreakDistance0.3Minimum required distance between price and band breakout
MaxAllowedSpreadPoints30.0Max spread in points (e.g., 30 points = 3.0 pips)
MaxDrawdownPercent10.0Stop all trading if drawdown exceeds this percentage
MaxDailyLossPercent5.0Daily loss cutoff for trades
MaxTradesOpenAtOnce2Limit the number of concurrent trades
StopTradeAfterXLosses3Max consecutive losses allowed before pause
MinEquityProtection100.0Stop trading if equity falls below this amount
MaxTradesPerSymbolPerDay5Max number of trades per symbol per day
DailyResetHour0Time to reset trade counters (0 = midnight server time)
EnableLotIncreaseOnWinfalseIncrease lot size after a win
EnableLotReductionOnDrawdownfalseReduce lot size if drawdown exceeds threshold
LotStepFactorOnWin1.2Step multiplier if increasing lots on win
LotDrawdownReduceThreshold10.0Drawdown % threshold before reducing lot
EnableRecoveryModefalseActivate smaller lot during recovery
RecoveryLotSize0.01Lot size to use during recovery phase
UseSeparateBuySellLimitsfalseIndependent trade limits for Buy/Sell
MaxOpenBuyTrades1Max allowed Buy trades if separated
MaxOpenSellTrades1Max allowed Sell trades if separated
UseMinimumTradeAgefalseRequire previous trades to reach age before re-entry
MinTradeAgeMinutes10Age in minutes required before reentry is allowed
UseMagicFilterfalseFilter based on Magic Number (for multi-EA use)
EntryMagicNumber22212010Magic number assigned to new entries
InpTradeComment"Psgrowth.com Expert_12010"Trade Comment
MaxTradesPerMagic1Maximum number of trades allowed per magic number
ExitSlopeSensitivity0.0001Minimum slope change to trigger exit
AllowAutoOverrideInputsForTuningfalse+------------------------------------------------------------------+
Source Code (.mq5)Open Source
Pipsgrowth_com_EX12010.mq5
#property copyright "Pipsgrowth.com"
#property link      "https://pipsgrowth.com"
#property version   "2.00"
#property strict
#property description "Pipsgrowth.com EX12010 A2_XAUUSD_5M — Volatility Gaussian Bands multi-filter confluence, full 12-layer stack."

#include <Trade\Trade.mqh>
CTrade trade;
#define MathPI 3.14159265358979323846
datetime lastTradeCandleTime = 0;
string g_filterStatus[];


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_Timeframe = PERIOD_H1;
ENUM_TIMEFRAMES g_TrendFilterTF = PERIOD_H1;
ENUM_APPLIED_PRICE g_PriceSource = PRICE_CLOSE;
ENUM_APPLIED_PRICE g_ST_SourcePrice = PRICE_CLOSE;
input group "=== 1. GENERAL TRADE SETTINGS ==="

// Trade mode: choose Buy, Sell, or both. Prevents conflicts between EnableBuy/Sell.
// Benefit: safer logic, no contradictory settings.
enum ENUM_TRADE_MODE {
   TRADE_BUY_ONLY,        // Only Buy positions
   TRADE_SELL_ONLY,       // Only Sell positions
   TRADE_BUY_AND_SELL     // Allow both directions
};
input ENUM_TRADE_MODE TradeMode = TRADE_BUY_AND_SELL;



// Whether to close existing opposite trades when a new signal appears.
// Helps reduce conflicting positions.

Full source code available on download

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

Tags:ex12010multiindicatorconfluencepipsgrowthfreemt5xauusd

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_EX12010.mq5
File Size75.2 KB
Versionv2.00
PlatformMetaTrader 5
File Type.mq5 Source
StrategyOther
Risk LevelMedium Risk
Timeframes
M5
Currency Pairs
XAUUSD
Min. Deposit$100