P
PipsGrowth
OtherOpen Source – Free

Pipsgrowth EX12076 MultiIndicatorConfluence

MT5 Expert Advisor (Open Source) · EURUSD · M1

Pipsgrowth.com EX12076 Portfolio_Expert_EURUSD_M1 — EA Studio portfolio of 10 strategies on EURUSD M1, full 12-layer stack.

Overview

Pipsgrowth EX12076 runs ten independent trading strategies on a single EURUSD M1 chart, each strategy firing its own signals and tagging its orders with a unique magic number derived from the base. The base magic is the input Base_Magic_Number = 22212076, and the function GetMagicNumber(strategyIndex) computes the per-strategy magic as 1000 * 22212076 + strategyIndex, so the ten strategies live under the magic range 22212076000 through 22212076009. With hedging accounts, all ten strategies can hold a position at the same time, and the single Max_Open_Positions = 100 input caps the combined portfolio size across every strategy.

Each strategy has its own private entry filter stack and exit filter stack generated by the EA Studio code-generator pipeline (visible in the /STRATEGY CODE {...}/ comment blocks above each signal call in the source). Strategy 0 enters on a triple-confirmation of ADX(9) cross, WPR(8) momentum, and ADX(10) trend pivot, and exits when price re-enters the Envelopes(25, 0.88) band; SL 37 pips, TP 46 pips. Strategy 1 stacks four filters — WPR(7) reclaiming the −37 line, DeMarker(18) below 0.45, StdDev(35) below 0.0045, and WPR(40) direction — and exits on RSI(24) hitting 87; SL 74, TP 56. Strategy 2 uses a dual-AO setup with Accelerator Oscillator direction and a Bollinger(25, 2.51) band touch, and closes on Stochastic(4,1,1) main/signal cross; SL 100, TP 68. Strategy 3 looks for ATR(17) acceleration with Alligator(43/29/29/14/14/4) lips/jaws expansion, and exits on StdDev(26) crossing 0.0052; SL 19, TP 90. Strategy 4 uses AO direction with ADX(37) DI± cross, and exits on Envelopes(23, 0.66) breach; SL 48, TP 93.

Strategy 5 stacks four filters: Stochastic(17,17,15) reclaiming 20, RSI(39) below 44, WPR(39) hook, and WPR(24) direction, with an ADX(43) cross of 38 as the exit; SL 60, TP 90. Strategy 6 uses WPR(25) below −80, ADX(38) above 21, Bollinger(17, 2.49) lower-band touch, and StdDev(8) below 0.0032, with RSI(31) crossing 32 as the exit; SL 37, TP 39. Strategy 7 combines Alligator(20/4/4/3/3/2) with ADX(23) DI± and Stochastic(7,2,1) main/signal, and exits on Envelopes(23, 0.16) band touch; SL 46, TP 96. Strategy 8 uses CCI(37) below 0 with MA(9) hook, and exits on Envelopes(37, 0.64) re-entry; SL 34, TP 71. Strategy 9 fires on Alligator(30/18/18/6/6/5) with MA Crossover(4, 23), and exits on Bollinger(10, 3.95) breach; SL 98, TP 65.

Lot sizing is uniform: a single input Entry_Amount = 0.01 lots is the only size used by every strategy — no per-strategy lot, no money-management scaling, no risk-percent. The number of strategies that can have live positions at once is limited only by Max_Open_Positions (100) and by per-strategy flip semantics: nine of the ten strategies use oppositeEntrySignal=1, meaning an opposite signal closes the existing position and immediately re-enters in the new direction; strategy 0 uses oppositeEntrySignal=0 and just waits for the next bar.

The execution stack is built to be self-healing. ManageOrderSend() retries the order up to TRADE_RETRY_COUNT = 4 times with TRADE_RETRY_WAIT = 100 ms back-off, calling IsTradeContextFree() first, which spins up to 30 seconds on TerminalInfoInteger(TERMINAL_TRADE_ALLOWED) before bailing. If the broker refuses the fill type, CheckOrder() walks orderFillingType through FOKIOCRETURNFOK until OrderCheck returns clean. The trade request uses request.deviation = 10 for slippage tolerance and the magic derived from GetMagicNumber(). Three CTrade-based retry helpers — TryClose_EX12076, TryClosePartial_EX12076, TryModify_EX12076 — wrap PositionClose / PositionClosePartial / PositionModify with three attempts on REQUOTE / TIMEOUT / PRICE_OFF / PRICE_CHANGED, with 200 ms or 100 ms back-off per retcode. ManageTrailingStop() also watches for the case where the ratcheted stop would cross the current Bid/Ask and closes the position instead of producing a negative-distance stop.

The session gate defaults to 24/7 (sessionSundayOpen=0, sessionSundayClose=86400, sessionMondayThursdayOpen=0, sessionMondayThursdayClose=86400, sessionFridayOpen=0, sessionFridayClose=86400) with sessionCloseAtSessionClose=false and sessionCloseAtFridayClose=false, so OnBar() runs on every M1 bar of every weekday and IsForceSessionClose() never fires. TesterHideIndicators(true) is set at the top of InitIndicatorHandlers() and false at the bottom so the visual chart stays clean during back-test. OnInit stores barTime = Time(0), fetches stopLevel from SYMBOL_TRADE_STOPS_LEVEL, and computes pip = 0.0001 for 4/5-digit brokers, 0.01 for 2/3-digit.

The portfolio is shaped for the EURUSD M1 micro-swing style: short pip targets (most SL/TP bands sit in the 20–100 pip range), 0.01-lot micro-positions, and per-strategy diversification that lets a trending strategy (S3, S7, S9) coexist with a mean-reversion strategy (S1, S6, S8) in the same account. With ten different indicator taxonomies (ADX, WPR, DeMarker, AO/AC, Bollinger, Stochastic, Alligator, MA, CCI, Envelopes) firing in parallel, the EA produces a continuous flow of small, diversely-correlated trades rather than concentrated directional bets. The cost is operational: 35 native indicator handles (5 entries + 5 exits per strategy × 2 buffers typical) plus per-strategy position bookkeeping, all running once per M1 bar.

In back-test on EURUSD M1 the EA tends to deliver a flat-to-positive equity curve with shallow drawdowns provided spreads stay under 1.0 pip and the broker tolerates a large count of small positions. Live traders should consider a sub-account or a sub-balance allocation of at least $1,000 per 0.01-lot pair-strategy cluster, an ECN or RAW-spread account for sub-pip execution, and a VPS with sub-25 ms latency to the broker's matching engine so the 100 ms retry budget inside ManageOrderSend() is sufficient to absorb requotes on the 1-minute timeframe.

Strategy Deep Dive

OnInit stores barTime, fetches SYMBOL_TRADE_STOPS_LEVEL into stopLevel, computes pip, and runs InitIndicatorHandlers() which calls iADX / iWPR / iDeMarker / iStdDev / iRSI / iAO / iAC / iBands / iStochastic / iATR / iAlligator / iEnvelopes / iCCI / iMA across 10 strategy slots and stores the handles in a 100x12x2 array; TesterHideIndicators is toggled around the block. OnTick checks IsForceSessionClose() (always false by default) and on a new bar calls OnBar() which sets the signal list via SetSignals(), then walks the array with ManageSignal() per signal — each ManageSignal() call looks up the position by its strategy-specific magic in the 2221207600022212076009 range and either closes (on exit signal or opposite-signal flip with oppositeEntrySignal=1), trails, or opens a new 0.01-lot position with the strategy's fixed SL and TP. Order execution goes through ManageOrderSend() → CheckOrder() with a 4-attempt retry loop and auto-fallback filling FOKIOCRETURN; three CTrade retry helpers TryClose/TryClosePartial/TryModify handle 200 ms or 100 ms back-off on REQUOTE/TIMEOUT/PRICE_OFF/PRICE_CHANGED. ManageTrailingStop() watches for the ratchet-to-negative-distance edge case and closes the position instead of producing a bad stop.

Entry Signal

Each of the ten internal strategies opens a position when its own indicator stack agrees: Strategy 0 needs ADX(9)+WPR(8)+ADX(10), Strategy 1 stacks WPR(7)/DeMarker(18)/StdDev(35)/WPR(40), Strategy 2 uses AO+AO+AC+Bollinger(25,2.51), Strategy 3 uses ATR(17)+Alligator(43/29/29/14/14/4), Strategy 4 uses AO+ADX(37), Strategy 5 uses Stochastic(17,17,15,20)+RSI(39,44)+WPR(39)+WPR(24), Strategy 6 uses WPR(25,-80)+ADX(38,21)+Bollinger(17,2.49)+StdDev(8,0.0032), Strategy 7 uses Alligator(20/4/4/3/3/2)+ADX(23)+Stochastic(7,2,1), Strategy 8 uses CCI(37,0)+MA(9), Strategy 9 uses Alligator(30/18/18/6/6/5)+MA Crossover(4,23).

Exit Signal

Each strategy has its own exit indicator: Strategy 0 closes on Envelopes(25,0.88) breach, Strategy 1 on RSI(24) hitting 87, Strategy 2 on Stochastic(4,1,1) main/signal cross, Strategy 3 on StdDev(26) crossing 0.0052, Strategy 4 on Envelopes(23,0.66) breach, Strategy 5 on ADX(43) crossing 38, Strategy 6 on RSI(31) crossing 32, Strategy 7 on Envelopes(23,0.16) band touch, Strategy 8 on Envelopes(37,0.64) re-entry, Strategy 9 on Bollinger(10,3.95) breach. Nine of ten strategies use oppositeEntrySignal=1 so an opposite signal closes the existing position and flips immediately; strategy 0 waits for the next bar.

Stop Loss

Per-trade fixed-pip stop-loss set per strategy in the source: S0=37, S1=74, S2=100, S3=19, S4=48, S5=60, S6=37, S7=46, S8=34, S9=98 pips. GetStopLossPrice() clamps the distance to MathMax(pipSL, _PointstopLevel) so the broker's minimum stop distance is always respected. No portfolio-level drawdown cap or equity-stop is enforced — only the Max_Open_Positions = 100 cap on total concurrent positions.

Take Profit

Per-trade fixed-pip take-profit set per strategy in the source: S0=46, S1=56, S2=68, S3=90, S4=93, S5=90, S6=39, S7=96, S8=71, S9=65 pips. GetTakeProfitPrice() uses the same MathMax(pipTP, _PointstopLevel) clamp as the SL function. No basket-TP, no equity-target close, no partial-close logic in this EA — exits are limited to per-strategy indicator exits and SL hits.

Best For

Minimum recommended balance: $1,000 (0.01-lot micro-positions × 10 strategies × SL/TP pip ranges of 19–100 pips × Max_Open_Positions = 100). Best for EURUSD-only ECN or RAW-spread accounts that allow 0.01-lot micro-lot trading with sub-pip execution and tolerance for 35+ concurrent indicator handles running once per M1 bar. VPS latency should be under 25 ms to the broker's matching engine so the 100 ms retry budget inside ManageOrderSend() is sufficient to absorb requotes on the 1-minute timeframe. Risk=MEDIUM, timeframes=M1, currency=EURUSD.

Strategy Logic

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

Family: MultiIndicatorConfluence Magic: 22212076 Version: 2.00

BRIEF: EA Studio Portfolio Expert for MetaTrader 5 hedging accounts. Opens separate positions for each of 10 internal strategies; every position carries a unique magic number derived from the strategy index. Full 12-layer stack: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

INDICATOR STACK:

  • Standard MT5 indicators

KEY FUNCTIONS:

  • OnBar()
  • ManageSignal()
  • CountPositions()
  • OpenPosition()
  • ClosePosition()
  • CloseAllPositions()
  • ManageOrderSend()
  • ModifyPosition()
  • CheckOrder()
  • GetStopLossPrice()
  • GetTakeProfitPrice()
  • GetTrailingStopPrice()
  • ...and 22 more

INTERNAL CONSTANTS (1 total):

  • OP_SELL = ORDER_TYPE_SELL // Session time is set in seconds from 00:00

INPUT PARAMETERS (4 total across 1 groups):

  • [] Entry_Amount = 0.01 // Entry lots
  • [] Base_Magic_Number = 22212076 // Base Magic Number
  • [] Options____ = "=== Options ===" // === Options ===
  • [] Max_Open_Positions = 100 // Max Open Positions
Pseudocode
// Pipsgrowth EX12076 MultiIndicatorConfluence — Execution Flow (from source analysis)
// Family: MultiIndicatorConfluence
// EA Studio Portfolio Expert for MetaTrader 5 hedging accounts. Opens separate positions for each of 10 internal strategies; every position carries a unique magic number derived from the strategy index. Full 12-layer stack: 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:
EURUSD
Optimized Timeframes:
M1

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
Entry_Amount0.01Entry lots
Base_Magic_Number22212076Base Magic Number
___Options_______"=== Options ==="=== Options ===
Max_Open_Positions100Max Open Positions
Source Code (.mq5)Open Source
Pipsgrowth_com_EX12076.mq5
#property copyright "Pipsgrowth.com"
#property link      "https://pipsgrowth.com"
#property version   "2.00"
#property strict
#property description "Pipsgrowth.com EX12076 Portfolio_Expert_EURUSD_M1 — EA Studio portfolio of 10 strategies on EURUSD M1, full 12-layer stack."
#include <Trade\Trade.mqh>

static input double Entry_Amount       =    0.01; // Entry lots
static input int    Base_Magic_Number  = 22212076; // Base Magic Number
static input string InpTradeComment    = "Psgrowth.com Expert_12076";

static input string ___Options_______  = "=== Options ==="; // === Options ===
static input int    Max_Open_Positions =     100; // Max Open Positions

#define TRADE_RETRY_COUNT 4
#define TRADE_RETRY_WAIT  100
#define OP_FLAT           -1
#define OP_BUY            ORDER_TYPE_BUY
#define OP_SELL           ORDER_TYPE_SELL

// Session time is set in seconds from 00:00
const int sessionSundayOpen           =     0; // 00:00
const int sessionSundayClose          = 86400; // 24:00
const int sessionMondayThursdayOpen   =     0; // 00:00
const int sessionMondayThursdayClose  = 86400; // 24:00
const int sessionFridayOpen           =     0; // 00:00
const int sessionFridayClose          = 86400; // 24:00
const bool sessionIgnoreSunday        = false;
const bool sessionCloseAtSessionClose = false;
const bool sessionCloseAtFridayClose  = false;

const int    strategiesCount = 10;
const double sigma        = 0.000001;
const int    requiredBars = 88;

datetime barTime;
double   stopLevel;
double   pip;
bool     setProtectionSeparately = false;
ENUM_ORDER_TYPE_FILLING orderFillingType = ORDER_FILLING_FOK;
int indHandlers[100][12][2];

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
enum OrderScope
  {
   ORDER_SCOPE_UNDEFINED,
   ORDER_SCOPE_ENTRY,
   ORDER_SCOPE_EXIT
  };
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
enum OrderDirection
  {
   ORDER_DIRECTION_NONE,
   ORDER_DIRECTION_BUY,
   ORDER_DIRECTION_SELL,
   ORDER_DIRECTION_BOTH

Full source code available on download

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

Tags:ex12076multiindicatorconfluencepipsgrowthfreemt5eurusd

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_EX12076.mq5
File Size62.0 KB
Versionv2.00
PlatformMetaTrader 5
File Type.mq5 Source
StrategyOther
Risk LevelMedium Risk
Timeframes
M1
Currency Pairs
EURUSD
Min. Deposit$100