P
PipsGrowth
OtherOpen Source – Free

Pipsgrowth EX12066 MultiIndicatorConfluence

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

Pipsgrowth.com EX12066 gen — Generated multi-signal EA (Envelopes+DEMA+TEMA), full 12-layer stack.

Overview

Pipsgrowth EX12066 is one of the few files in the EX12 family that is built on the standard MQL5 Wizard CExpert class rather than a hand-rolled OnTick event handler. The .mq5 #include list tells the story up front: <Expert\Expert.mqh> for the engine, three signal modules (SignalEnvelopes.mqh, SignalDEMA.mqh, SignalTEMA.mqh) for the voting logic, TrailingParabolicSAR.mqh for stop management, and MoneyFixedLot.mqh for position sizing. The wizard scaffolds the strategy; the user adjusts 26 inputs that parameterize those five building blocks. Every order the EA ever places flows through CExpert.OnTick, which means the framework itself is responsible for tick sequencing, bar detection, and event dispatch — the strategy code in EX12066 only configures weights, thresholds, and trailing/money parameters.

The signal layer is a three-vote weighted consensus. CExpertSignal is constructed in OnInit, then a CSignalEnvelopes filter (filter0), a CSignalDEMA filter (filter1), and a CSignalTEMA filter (filter2) are added to the signal object via signal.AddFilter. Each filter exposes a Weight parameter (Signal_Envelopes_Weight, Signal_DEMA_Weight, Signal_TEMA_Weight — all defaulted to 1.0) and is configured with its own period, applied price, and method. The Envelopes filter uses a 45-period SMA with 0.15 deviation applied to close (1). The DEMA filter uses a 12-period DEMA on close. The TEMA filter uses a 12-period TEMA, and unlike the other two its period is hardcoded to PERIOD_M1 by the line filter2.Period(PERIOD_M1) — TEMA is always sampled on the M1 timeframe regardless of the chart the EA is attached to. Each filter votes bullish, bearish, or neutral with a magnitude in [0..100]; the CExpertSignal sums the weighted votes and compares the running total to the open and close thresholds. Signal_ThresholdOpen defaults to 10 — meaning the combined bullish vote must clear 10 for a long to be permitted. Signal_ThresholdClose defaults to 10 on the close side, so a symmetric bearish-vote magnitude must clear 10 to trigger an exit. Signal_PriceLevel is a price-distance gate in points; Signal_StopLevel (50) and Signal_TakeLevel (50) are passed straight through to the CExpertSignal and become the protective stops for any new position. Signal_Expiration (4) sets how many bars a pending order lives before the framework cancels it.

The three filter weights are the most actionable tuning knob in the EA. Setting Signal_Envelopes_Weight to 0 turns the Envelopes band vote off entirely without removing the indicator; the same is true for DEMA and TEMA. This lets a user collapse the strategy to a single-vote system (Envelopes-only, DEMA-only, TEMA-only) or experiment with asymmetric weighting (Envelopes 0.5 / DEMA 1.0 / TEMA 1.5) to see how the band mean-reversion vote interacts with the trend votes. The framework requires ValidationSettings() to pass in OnInit — that is where CExpert checks the cross-filter parameter constraints before going live.

Trailing is delegated to a single CTrailingPSAR object. The Parabolic SAR is configured with Trailing_ParabolicSAR_Step = 0.02 (the acceleration factor increment) and Trailing_ParabolicSAR_Maximum = 0.2 (the AF ceiling). Once a position is open, the framework watches the SAR flip and moves the stop to the new SAR point on every bar, so a long position's stop ratchets up under the rising SAR dots and a short position's stop ratchets down over the falling SAR dots. The framework takes over the stop on the bar after entry; the EA does not manage the stop in custom code. There is no ATR trailing, no breakeven ratchet, no dynamic profit lock, and no mean-reversion exit in this build — Parabolic SAR is the only trailing mechanism, and Signal_StopLevel / Signal_TakeLevel are the only fixed protective stops the EA ever places.

Position sizing runs through CMoneyFixedLot with Money_FixLot_Percent = 10.0 and Money_FixLot_Lots = 0.1. The FixedLot money manager sends a constant 0.1 lots to every entry, regardless of stop distance, account balance, or symbol contract size. The 10.0 percent field is metadata for CMoneyFixedLot; on this build it is not used to scale the lot. Because the lot is fixed, scaling-in (the SCALING layer mentioned in the architecture comment) is not implemented — every entry is a single 0.1-lot position, and adding to winners is not part of this EA's behavior. The 0.1-lot value, combined with the symmetric 50/50 SL and TP, is the entire money profile the EA enforces on the account.

The event surface in EX12066 is the standard wizard quintet. OnInit instantiates the CExpert, the signal, three filter objects, the trailing, and the money manager, then runs ValidationSettings() and InitIndicators(). OnDeinit calls ExtExpert.Deinit() to release everything. OnTick, OnTrade, and OnTimer each forward to the framework's matching handler. Expert_EveryTick is hardcoded to false, so the framework operates in open-bar mode — entries and trailing re-evaluations only fire on the opening tick of a new bar, not on every quote. This is one of the more important runtime properties: with EveryTick off, backtest behavior is deterministic and identical to live behavior on the same broker, and the EA will not over-trade during a fast M5 candle on a low-liquidity server. The CTrade retry wrappers TryClose_EX12066, TryClosePartial_EX12066, and TryModify_EX12066 sit at the bottom of the file as standalone helpers — they are not called by the framework code (which uses its own CTrade instance inside CExpert) and exist as user-callable utilities for anyone extending the EA with custom OnTick logic.

For practical deployment, EX12066's symmetric 50/50 SL/TP combined with the 0.1 fixed lot makes it a low-volatility targeter — the Envelopes 45/0.15 band is the slow vote, the DEMA 12 is the medium-speed trend vote, the TEMA 12 on M1 is the fast-cycle vote, and Parabolic SAR trailing is the exit engine. On XAUUSD M5, the framework will only enter on a new M5 bar when all three votes are aligned past the threshold; that is rare, so the strategy runs cool and trade counts will be modest. On H1 the same configuration produces a more conservative weekly cadence. The minimum deposit of $100 is enough for a single 0.1-lot XAUUSD position at 50 points of risk because the framework blocks re-entries while a position is still open — pyramiding is not part of this EA's behavior, so the capital requirement is genuinely $100 and not a per-grid estimate.

Strategy Deep Dive

EX12066 is a wizard-scaffolded CExpert Expert Advisor that ships three independent signal modules (CSignalEnvelopes 45 SMA 0.15 deviation, CSignalDEMA 12, CSignalTEMA 12) into a single CExpertSignal container with per-filter weights defaulted to 1.0. On every new-bar tick, each filter produces a directional vote in [0..100]; the running weighted sum is compared against Signal_ThresholdOpen (10) for entry and Signal_ThresholdClose (10) for exit, and the framework opens or closes positions through the CTrade path when the threshold trips. The TEMA filter is hardcoded to PERIOD_M1 via filter2.Period(PERIOD_M1), so its vote is always sampled on the M1 timeframe regardless of chart. Entries are taken with a 50-point stop and a 50-point take-profit (symmetric 1:1), and a Parabolic SAR trailing object (CTrailingPSAR, step 0.02, max 0.2) takes over stop management after entry. Sizing comes from CMoneyFixedLot at 0.1 lots, and Expert_EveryTick is hardcoded to false so the EA operates in open-bar mode. The file also exposes three standalone CTrade retry helpers (TryClose_EX12066, TryClosePartial_EX12066, TryModify_EX12066 with 200ms/100ms retry sleeps) that are not called by the framework but are available for any custom OnTick extension.

Entry Signal

A new entry is permitted on a new-bar tick when the weighted sum of the three CSignalEnvelopes, CSignalDEMA, and CSignalTEMA votes exceeds Signal_ThresholdOpen (default 10) on the bullish side for longs, or drops below -10 for shorts, and the entry price is at least Signal_PriceLevel (default 0.0 points) away from the current market. The TEMA vote is always sampled on the M1 timeframe regardless of the chart the EA is attached to. The framework blocks re-entries while a position is still open, so EX12066 runs as a single-position-at-a-time strategy.

Exit Signal

A long position is closed when the combined bearish vote from the three filters drops below -Signal_ThresholdClose (default -10), or when the Parabolic SAR trailing stop is hit, or when the 50-point fixed take-profit fires. Symmetric logic applies to shorts. The trailing stop migrates to the new Parabolic SAR value on every bar after entry, so the exit is governed by the SAR flip rather than a fixed pip distance.

Stop Loss

Stop loss is set to 50 points (Signal_StopLevel) on entry and is then taken over by the Parabolic SAR trailing (Trailing_ParabolicSAR_Step 0.02, Trailing_ParabolicSAR_Maximum 0.2). The stop ratchets under the SAR dots on every new bar; no ATR trailing, no breakeven ratchet, and no account-level drawdown cap are implemented in this build.

Take Profit

Take profit is set to 50 points (Signal_TakeLevel) on entry, giving a symmetric 1:1 risk-to-reward against the 50-point stop. The TP is a one-shot target — once price reaches the level the framework closes the position; no partial TP, no scaled exit, and no trailing TP are implemented.

Best For

Minimum recommended balance: $100 (one 0.1-lot XAUUSD position with 50 points of risk; the framework blocks re-entries so no scaling capital is required). Best deployed on a low-spread ECN or RAW account because the 50/50 SL/TP arms can be wiped by spread alone on a higher-cost feed. Timeframe: M5 for the recommended fast-cycle behavior, H1 for a slower weekly cadence. Session: with the TEMA vote locked to M1 and the Envelopes 45 band as a slow filter, the strategy produces its cleanest votes during the London-New York overlap when XAUUSD has both volatility and mean-reverting behavior; the Asian session will be quiet. Risk level: MEDIUM due to the symmetric 1:1 R:R and lack of account-level drawdown cap.

Strategy Logic

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

Family: MultiIndicatorConfluence Magic: 22212066 Version: 2.00

BRIEF: Generated multi-signal EA combining Envelopes, DEMA and TEMA filters with Parabolic SAR trailing and fixed-lot money management. Part of the 12-layer stack architecture. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

INDICATOR STACK:

  • Standard MT5 indicators

KEY FUNCTIONS:

  • OnTrade()
  • OnTimer()
  • TryClose_EX12066()
  • TryClosePartial_EX12066()
  • TryModify_EX12066()

INTERNAL CONSTANTS (0 total):

INPUT PARAMETERS (26 total across 4 groups):

  • [=== Identity ===] InpTradeComment = "Psgrowth.com Expert_12066" // Trade comment
  • [=== Identity ===] Expert_MagicNumber = 22212066 // Magic Number
  • [=== Signal ===] Signal_ThresholdOpen = 10 // Signal threshold value to open [0...100]
  • [=== Signal ===] Signal_ThresholdClose = 10 // Signal threshold value to close [0...100]
  • [=== Signal ===] Signal_PriceLevel = 0.0 // Price level to execute a deal
  • [=== Signal ===] Signal_StopLevel = 50.0 // Stop Loss level (in points)
  • [=== Signal ===] Signal_TakeLevel = 50.0 // Take Profit level (in points)
  • [=== Signal ===] Signal_Expiration = 4 // Expiration of pending orders (in bars)
  • [=== Signal ===] Signal_Envelopes_PeriodMA = 45 // Envelopes(45,0,MODE_SMA,...) Period of averaging
  • [=== Signal ===] Signal_Envelopes_Shift = 0 // Envelopes(45,0,MODE_SMA,...) Time shift
  • [=== Signal ===] Signal_Envelopes_Method = MODE_SMA // Envelopes(45,0,MODE_SMA,...) Method of averaging
  • [=== Signal ===] Signal_Envelopes_Applied = 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // Envelopes(45,0,MODE_SMA,...) Prices series
  • [=== Signal ===] Signal_Envelopes_Deviation = 0.15 // Envelopes(45,0,MODE_SMA,...) Deviation
  • [=== Signal ===] Signal_Envelopes_Weight = 1.0 // Envelopes(45,0,MODE_SMA,...) Weight [0...1.0]
  • [=== Signal ===] Signal_DEMA_PeriodMA = 12 // Double Exponential Moving Average Period of averaging
  • [=== Signal ===] Signal_DEMA_Shift = 0 // Double Exponential Moving Average Time shift
  • [=== Signal ===] Signal_DEMA_Applied = 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // Double Exponential Moving Average Prices series
  • [=== Signal ===] Signal_DEMA_Weight = 1.0 // Double Exponential Moving Average Weight [0...1.0]
  • [=== Signal ===] Signal_TEMA_PeriodMA = 12 // Triple Exponential Moving Average M1 Period of averaging
  • [=== Signal ===] Signal_TEMA_Shift = 0 // Triple Exponential Moving Average M1 Time shift
  • [=== Signal ===] Signal_TEMA_Applied = 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // Triple Exponential Moving Average M1 Prices series
  • [=== Signal ===] Signal_TEMA_Weight = 1.0 // Triple Exponential Moving Average M1 Weight [0...1.0]
  • [=== Trailing ===] Trailing_ParabolicSAR_Step = 0.02 // Speed increment
  • [=== Trailing ===] Trailing_ParabolicSAR_Maximum = 0.2 // Maximum rate
  • [=== Money ===] Money_FixLot_Percent = 10.0 // Percent
  • [=== Money ===] Money_FixLot_Lots = 0.1 // Fixed volume
Pseudocode
// Pipsgrowth EX12066 MultiIndicatorConfluence — Execution Flow (from source analysis)
// Family: MultiIndicatorConfluence
// Generated multi-signal EA combining Envelopes, DEMA and TEMA filters with Parabolic SAR trailing and fixed-lot money management. Part of the 12-layer stack architecture. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

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

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

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

Optimization Profile

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

How to Install This EA on MT5

  1. 1Download the .mq5 file using the button above
  2. 2Open MetaTrader 5 on your computer
  3. 3Click File → Open Data Folder in the top menu
  4. 4Navigate to MQL5 → Experts and paste the .mq5 file there
  5. 5In MT5, right-click Expert Advisors in the Navigator panel → Refresh
  6. 6Drag the EA onto 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
InpTradeComment"Psgrowth.com Expert_12066"Trade comment
Expert_MagicNumber22212066Magic Number
Signal_ThresholdOpen10Signal threshold value to open [0...100]
Signal_ThresholdClose10Signal threshold value to close [0...100]
Signal_PriceLevel0.0Price level to execute a deal
Signal_StopLevel50.0Stop Loss level (in points)
Signal_TakeLevel50.0Take Profit level (in points)
Signal_Expiration4Expiration of pending orders (in bars)
Signal_Envelopes_PeriodMA45Envelopes(45,0,MODE_SMA,...) Period of averaging
Signal_Envelopes_Shift0Envelopes(45,0,MODE_SMA,...) Time shift
Signal_Envelopes_MethodMODE_SMAEnvelopes(45,0,MODE_SMA,...) Method of averaging
Signal_Envelopes_Applied1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // Envelopes(45,0,MODE_SMA,...) Prices series
Signal_Envelopes_Deviation0.15Envelopes(45,0,MODE_SMA,...) Deviation
Signal_Envelopes_Weight1.0Envelopes(45,0,MODE_SMA,...) Weight [0...1.0]
Signal_DEMA_PeriodMA12Double Exponential Moving Average Period of averaging
Signal_DEMA_Shift0Double Exponential Moving Average Time shift
Signal_DEMA_Applied1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // Double Exponential Moving Average Prices series
Signal_DEMA_Weight1.0Double Exponential Moving Average Weight [0...1.0]
Signal_TEMA_PeriodMA12Triple Exponential Moving Average M1 Period of averaging
Signal_TEMA_Shift0Triple Exponential Moving Average M1 Time shift
Signal_TEMA_Applied1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // Triple Exponential Moving Average M1 Prices series
Signal_TEMA_Weight1.0Triple Exponential Moving Average M1 Weight [0...1.0]
Trailing_ParabolicSAR_Step0.02Speed increment
Trailing_ParabolicSAR_Maximum0.2Maximum rate
Money_FixLot_Percent10.0Percent
Money_FixLot_Lots0.1Fixed volume
Source Code (.mq5)Open Source
Pipsgrowth_com_EX12066.mq5
#property copyright "Pipsgrowth.com"
#property link      "https://pipsgrowth.com"
#property version   "2.00"
#property strict
#property description "Pipsgrowth.com EX12066 gen — Generated multi-signal EA (Envelopes+DEMA+TEMA), full 12-layer stack."
#include <Expert\Expert.mqh>
//--- available signals
#include <Expert\Signal\SignalEnvelopes.mqh>
#include <Expert\Signal\SignalDEMA.mqh>
#include <Expert\Signal\SignalTEMA.mqh>
//--- available trailing
#include <Expert\Trailing\TrailingParabolicSAR.mqh>
//--- available money management
#include <Expert\Money\MoneyFixedLot.mqh>
//+------------------------------------------------------------------+
//| Inputs                                                           |
//+------------------------------------------------------------------+
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_APPLIED_PRICE g_Signal_Envelopes_Applied = PRICE_CLOSE;
ENUM_APPLIED_PRICE g_Signal_DEMA_Applied = PRICE_CLOSE;
ENUM_APPLIED_PRICE g_Signal_TEMA_Applied = PRICE_CLOSE;
input group "=== Identity ==="
input string             InpTradeComment              ="Psgrowth.com Expert_12066";       // Trade comment
input ulong              Expert_MagicNumber           =22212066;       // Magic Number
bool                     Expert_EveryTick             =false;       //
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_APPLIED_PRICE g_Signal_Envelopes_Applied = PRICE_CLOSE;
ENUM_APPLIED_PRICE g_Signal_DEMA_Applied = PRICE_CLOSE;
ENUM_APPLIED_PRICE g_Signal_TEMA_Applied = PRICE_CLOSE;
input group "=== Signal ==="
input int                Signal_ThresholdOpen         =10;          // Signal threshold value to open [0...100]
input int                Signal_ThresholdClose        =10;          // Signal threshold value to close [0...100]
input double             Signal_PriceLevel            =0.0;         // Price level to execute a deal
input double             Signal_StopLevel             =50.0;        // Stop Loss level (in points)

Full source code available on download

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

Tags:ex12066multiindicatorconfluencepipsgrowthfreemt5xauusd

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_EX12066.mq5
File Size14.9 KB
Versionv2.00
PlatformMetaTrader 5
File Type.mq5 Source
StrategyOther
Risk LevelMedium Risk
Timeframes
M5H1
Currency Pairs
XAUUSD
Min. Deposit$100