Pipsgrowth EX12073 MultiIndicatorConfluence
MT5 Expert Advisor (Open Source) · XAUUSD · M5
Pipsgrowth.com EX12073 MultiStrategyEA_v1_2 — Multi-strategy EA (AC+ADX+AO+DeM+FBB+MFI+MS), full 12-layer stack.
Overview
EX12073 is a seven-strategy parallel voting engine. Where most multi-indicator EAs blend a handful of oscillators into one consensus, EX12073 deploys seven independent signal pipelines — AC, ADX, AO, DeM, FBB, MFI, MS — each with its own indicator handle, its own TP and SL expressed in pips, its own lot calculator, its own recovery switch, and its own magic number for position tracking. Every pipeline runs on every bar close and the EA can either fire all of them at once or hold them back via a mutual-exclusion rule, depending on how you set TradeAllStrategies.
The seven sub-strategies map to nine native indicator handles. iAC and iAO are bare defaults. iADX uses 20 bars. iDeMarker uses 20 bars. The FBB sub-strategy is the only dual-indicator block: it pairs iBands(20, 0, 1.8, PRICE_CLOSE) with iForce(20, MODE_SMA, VOLUME_TICK). MFI is iMFI(12, VOLUME_TICK). The MS sub-strategy combines iMACD(3, 9, 2, PRICE_CLOSE) with iStochastic(5, 3, 12, MODE_SMA, STO_LOWHIGH). Each sub-strategy has its own *_GetSignals() function — AC_GetSignals(), ADX_GetSignals(), and so on through MS_GetSignals() — called from OnTick only when the current bar's open time differs from the previous tick's run, which keeps CPU usage flat during quiet ticks.
Each sub-strategy ships with a numeric signal-type selector and a level. AC and AO allow 8 signal types (0=disabled) with AC_LevelOpenOrders=80.0 and AC_LevelCloseOrders=70.0 versus AO_LevelOpenOrders=55.0 and AO_LevelCloseOrders=40.0. ADX, DeM, and MFI allow 4 signal types with paired entry and exit levels (e.g. ADX_LevelOpenOrders_1=55.0 / ADX_LevelOpenOrders_2=15.0). FBB and MS use a two-tier type/level scheme — FBB picks one type from 2 options for tier 1 and one from 8 for tier 2; MS picks one from 11 for tier 1 and one from 28 for tier 2. The OpenOrdersType and CloseOrdersType values are validated in OnInit: mismatched values abort the EA with INIT_FAILED, as do negative SL/TP, out-of-range RiskFactor, and an OpenOrdersType equal to CloseOrdersType when CloseInSignals is true.
TP and SL are per-sub-strategy, expressed in pips, and selected via a Levels enum that decides how the protective levels are stored. Use_Only_Hard_Levels writes them to the broker's stop orders; Use_Only_Virtual_Levels (the default) keeps them inside the EA and closes via CloseOrders() on threshold breach; Use_Hard_And_Virtual_Levels writes both. The defaults are wildly different per sub-strategy — AC trades 95-pip TP against 85-pip SL, ADX trades 35/70, AO trades 10/80, DeM trades 5/60, FBB trades 5/15, MFI trades 50/25, MS trades 10/45 — so any single backtest reflects a specific mix. Before any order is sent, the EA clamps each *_PipsStopLoss and *_PipsTakeProfit to the broker's SYMBOL_TRADE_STOPS_LEVEL via MathMax(input, StopLevel), and any user-set value that falls below the stop level triggers a MessageBox warning at startup.
Lot sizing is per-sub-strategy. Each block has its own *_AutoLotSize boolean, *_RiskFactor (validated to 0.01–100), and *_ManualLotSize (default 0.10). When AutoLotSize is on, CalcLots() is called once per pipeline using the live account equity and the configured risk factor; when off, the manual lot is sent as-is. Recovery is its own switch with three modes — Not_Use_Recovery (default), Use_Last_Closing (recover against the last closed P&L), and Use_Higher_Profits (recover against the all-time-best historical P&L) — with a *_MultiRecoveryLot=2.0 step that doubles the recovery lot when the previous trade closed negative.
The grid layer sits on top of every sub-strategy. MakeOrdersGrid is a four-way enum: Not_Make_Grid (single position per direction), Make_Grid_In_Loss (add positions if the latest is in drawdown by PipsBetweenOrders), Make_Grid_In_Profit (add positions if the latest is in profit by PipsBetweenOrders), and Make_Grid_Loss_And_Profit (either). The 60-second TimeBetweenOrders debounces new entries so the EA cannot chain more than one order per sub-strategy per minute. When TradeAllStrategies is false, opening an order in any sub-strategy blocks the other six — AC_SumOrders+AO_SumOrders+...==0 is the gate condition repeated in every block of MainFunction(). When TradeAllStrategies is true, all seven can hold positions simultaneously, but each keeps its own magic number (911355 / 11625 / 112981 / 991725 / 113881 / 13902379 / 9093355) so GetResultsCurrentOrders() can attribute them correctly.
Pair routing is unusual. PairToTrade defaults to TRADE_EURUSD_4, but a 28-pair Pair enum covers the majors, crosses, and yen pairs (EURUSD, GBPUSD, USDJPY, EURJPY, AUDNZD, CADCHF, CHFJPY, and so on through 28 entries). If you set PairToTrade=CHART_PAIR (value 0), the EA auto-detects the symbol from the chart at startup and reassigns TypeOfPair accordingly. The EA then forces the chart to the chosen symbol and g_TimeFrame via ChartSetSymbolPeriod(). The default g_TimeFrame resolves from TimeFrame=8 through the MapTimeframeInt switch — values 1–7 map to M1/D1, but 8 falls through to PERIOD_H1, so the EA will run H1 unless you dial the input back to 5.
Session control is mechanical and broker-aware. SymbolInfoSessionTrade() returns the broker's actual trading hours for each weekday; on Mondays the EA suppresses new orders for WaitAfterOpen=60 minutes after the open, and on Fridays it suppresses new orders StopBeforeClose=60 minutes before close. The market-open check spans all seven weekdays. The TypeOperation enum drives three global modes: Stand_by_Mode returns early before any trade logic, Normal_Operation is the live trading path, and Close_Immediately_All_Orders walks every sub-strategy and closes every open position before returning.
The visual layer is heavier than usual. ShowComments=true drops a background rectangle, then CommentScreen() builds a 19-row Com* object panel on the chart with the EA name, spread, money-management state, current open orders, and recent history. Six color inputs (ColorOffLines, ColorExpertName, ColorSpreadInfo, ColorMoneyMngmnt, ColorCurrentOrders, ColorHistoryOrders) customize the panel. The cleanup path in OnDeinit walks every Com* object plus the background and removes them; all nine indicator handles are released via IndicatorRelease() before the EA unloads.
Three retry helpers — TryClose_EX12073, TryClosePartial_EX12073, and TryModify_EX12073 — are declared but not threaded into MainFunction(), which uses CTrade directly. They exist for future wiring, so any third-party caller can rebroadcast close and modify requests on REQUOTE, TIMEOUT, PRICE_OFF, or PRICE_CHANGED with a short retry interval. This is the same pattern used in other EX12 EAs in the family. The headline file magic — MagicSet=22212073 — is reserved for the EA's overall identity, but per-position tracking uses the seven hard-coded magic IDs above so that GetResultsCurrentOrders() can isolate the positions that belong to each sub-strategy before applying per-pipeline state. MaxSpread=0 is the default (no spread filter) and MaxOrders=0 means no per-account order cap beyond whatever the broker imposes via ACCOUNT_LIMIT_ORDERS.
Strategy Deep Dive
The engine in EX12073 is a per-bar dispatcher: OnTick compares the current iTime of the symbol to LastTimeRunFunctions and only when a new bar opens does it call the seven *_GetSignals() functions in turn, each of which copies the indicator buffer for its own oscillator and decides whether to set the matching *_OpenBuy / *_OpenSell / *_CloseBuy / *_CloseSell boolean. MainFunction() then validates market-open via SymbolInfoSessionTrade() per weekday, blocks trades during the Monday WaitAfterOpen=60 and Friday StopBeforeClose=60 windows, checks MaxSpread, walks the seven per-sub-strategy state machines via GetResultsCurrentOrders() and GetResultsHistoryOrders(), applies the grid logic for the seven sub-strategies independently, applies the mutual-exclusion check when TradeAllStrategies=false, and finally dispatches OpenOrders() and CloseOrders() per sub-strategy magic. The chart panel is rebuilt every tick through CommentScreen() and the background rectangle is removed in OnDeinit along with the nine indicator handles via IndicatorRelease().
EX12073 runs seven independent signal pipelines on every bar close: AC (Accelerator Oscillator) with AC_OpenOrdersType=5 and AC_LevelOpenOrders=80.0; ADX (20 bars) with ADX_OpenOrdersType=2 and dual level thresholds (55.0 / 15.0); AO with AO_OpenOrdersType=6 and AO_LevelOpenOrders=55.0; DeMarker (20 bars) with DeM_OpenOrdersType=3 and DeM_LevelOpenOrders=75.0; FBB pairing Bollinger Bands(20, 0, 1.8) with Force Index(20) via FBB_OpenOrdersType_1=1 + FBB_OpenOrdersType_2=8; MFI(12) with MFI_OpenOrdersType=3 and MFI_LevelOpenOrders=90.0; and MS combining MACD(3,9,2) with Stochastic(5,3,12) via MS_OpenOrdersType_1=8 + MS_OpenOrdersType_2=22. With TradeAllStrategies=true all seven can fire in parallel, each holding its own magic number; with TradeAllStrategies=false, any open order in one sub-strategy blocks the other six.
Each sub-strategy exits independently using its own TP and SL expressed in pips and selected through the per-strategy Levels enum (Hard / Virtual / Both). Defaults: AC 95/85, ADX 35/70, AO 10/80, DeM 5/60, FBB 5/15, MFI 50/25, MS 10/45. With CloseInReverse=true (the default), the *_GetSignals() reverse direction fires *_CloseBuy / *_CloseSell flags which MainFunction() translates into CloseOrders() calls per magic number. The grid layer can also open additional positions when MakeOrdersGrid is set to Make_Grid_In_Loss / Make_Grid_In_Profit / Make_Grid_Loss_And_Profit and the price has moved PipsBetweenOrders against or in favour of the latest open.
Stop-loss is configured per sub-strategy in pips, with Use_Only_Virtual_Levels as the default mode (kept inside the EA, enforced via CloseOrders() rather than a broker stop). The EA clamps every *_StopLoss to the broker's SYMBOL_TRADE_STOPS_LEVEL via MathMax at startup. There is no global portfolio drawdown cap — risk is bound by the per-sub-strategy MaxOrders aggregator and the 60-second TimeBetweenOrders debounce.
Take-profit is configured per sub-strategy in pips, defaulting to Use_Only_Virtual_Levels (EA-enforced, not broker-side). Per-strategy defaults: AC 95 pips, ADX 35, AO 10, DeM 5, FBB 5, MFI 50, MS 10. When AC_CloseInSignals / ADX_CloseInSignals / AO_CloseInSignals / etc. is true, the per-sub-strategy *_CloseOrdersType (e.g. AC_CloseOrdersType=1 against AC_LevelCloseOrders=70.0) fires a signal-based exit before the TP threshold is reached.
Minimum recommended balance: $100 on a low-spread ECN or RAW-spread account, with a sub-account dedicated to gold (XAUUSD) on M5. The seven sub-strategies are heavy on the M5 CPU — 9 native indicator handles refreshed per bar plus the per-sub-strategy state walk — so a VPS with sub-25ms ping to the broker is advisable. With TradeAllStrategies=true all seven can run side by side, so the effective capital requirement climbs sharply and $500–$1,000 is a more realistic live-trading floor; with TradeAllStrategies=false and grid disabled the EA behaves like a single-vote system and the $100 deposit level is workable. Session control is broker-aware, so a broker that publishes accurate Sunday/Monday/Friday session windows is required to make the ControlSession block behave.
Strategy Logic
Pipsgrowth EX12073 MultiIndicatorConfluence — Strategy Logic Analysis (from .mq5 source)
Family: MultiIndicatorConfluence
Magic: 22212073
Version: 2.00
BRIEF:
Multi-strategy EA combining AC, ADX, AO, DeM, FBB, MFI and MS indicators with grid orders, recovery lot sizing, session control and multi-pair trading support. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester
INDICATOR STACK:
- Standard
MT5indicators
KEY FUNCTIONS:
MainFunction()OpenOrders()CloseOrders()GetResultsCurrentOrders()GetResultsHistoryOrders()CalcLots()DrawObjects()DisplayText()CommentScreen()AC_GetSignals()ADX_GetSignals()AO_GetSignals()- ...and 7 more
INTERNAL CONSTANTS (1 total):
MagicSet=22212073// ============================================================================================================================================================================================================================//
INPUT PARAMETERS (145 total across 29 groups):
- [===
OPERATIONSETTINGS===]TypeOperation= Normal_Operation // Type Of Operation - [===
CHART&SYMBOLSETTINGS===]SetChartUses=true// Set Automatically Chart To Use - [===
CHART&SYMBOLSETTINGS===]PairToTrade=TRADE_EURUSD_4// Symbol Expert Trade - [===
GENERALTRADINGSETTINGS===]TimeFrame= 8 //Timeframe(1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)//Period Of Bars - [===
GENERALTRADINGSETTINGS===]CloseInReverse=true// Close Orders In Reverse Signal - [===
GENERALTRADINGSETTINGS===]TradeAllStrategies=true// Trade All Strategikes Together - [=== AC
STRATEGY===] AC_StrategyRun =true// AC Strategy Run - [=== AC Signal Parameters ===] AC_OpenOrdersType = 5 // AC Type Of Open
Orders(0=Not Use)(from 1 to 8) - [=== AC Signal Parameters ===] AC_LevelOpenOrders =
80.0// AC Level Open Orders - [=== AC Signal Parameters ===] AC_CloseInSignals =
true// AC Close Orders With Signals - [=== AC Signal Parameters ===] AC_CloseOrdersType = 1 // AC Type Of Close
Orders(0=Not Use)(from 1 to 8) - [=== AC Signal Parameters ===] AC_LevelCloseOrders =
70.0// AC Level Close Orders - [=== AC Order Management ===] AC_TypeOfLevelsUse = Use_Only_Virtual_Levels // AC Type Of Levels Use To Close Orders
- [=== AC Order Management ===] AC_TakeProfit =
95.0// AC Pips TakeProfit(0=Not Use) - [=== AC Order Management ===] AC_StopLoss =
85.0// AC Pips StopLoss(0=Not Use) - [=== AC Money Management ===] AC_AutoLotSize =
true// AC Auto Money Management - [=== AC Money Management ===] AC_RiskFactor =
1.0// AC Risk Money Management - [=== AC Money Management ===] AC_ManualLotSize =
0.10// AC Manual Lot Size - [=== AC Recovery Settings ===] AC_UseRecoveryLot = Not_Use_Recovery // AC Use Recovery Lot Size After Losses
- [=== AC Recovery Settings ===] AC_MultiRecoveryLot =
2.0// AC Multiplier For Recovery Lot Size - [===
ADXSTRATEGY===] ADX_StrategyRun =true//ADXStrategy Run - [===
ADXIndicator Parameters ===] ADX_BarsCalculate = 20 //ADXBars Calculate Signals - [===
ADXSignal Parameters ===] ADX_OpenOrdersType = 2 //ADXType Of OpenOrders(0=Not Use)(from 1 to 4) - [===
ADXSignal Parameters ===] ADX_LevelOpenOrders_1 =55.0//ADXLevel Open Orders 1 - [===
ADXSignal Parameters ===] ADX_LevelOpenOrders_2 =15.0//ADXLevel Open Orders 2 - [===
ADXSignal Parameters ===] ADX_CloseInSignals =true//ADXClose Orders With Signals - [===
ADXSignal Parameters ===] ADX_CloseOrdersType = 4 //ADXType Of CloseOrders(0=Not Use)(from 1 to 4) - [===
ADXSignal Parameters ===] ADX_LevelCloseOrders_1 =15.0//ADXLevel Close Orders 1 - [===
ADXSignal Parameters ===] ADX_LevelCloseOrders_2 =5.0//ADXLevel Close Orders 2 - [===
ADXOrder Management ===] ADX_TypeOfLevelsUse = Use_Only_Virtual_Levels //ADXType Of Levels Use To Close Orders - [===
ADXOrder Management ===] ADX_TakeProfit =35.0//ADXPips TakeProfit(0=Not Use) - [===
ADXOrder Management ===] ADX_StopLoss =70.0//ADXPips StopLoss(0=Not Use) - [===
ADXMoney Management ===] ADX_AutoLotSize =true//ADXAuto Money Management - [===
ADXMoney Management ===] ADX_RiskFactor =1.0//ADXRisk Money Management - [===
ADXMoney Management ===] ADX_ManualLotSize =0.10//ADXManual Lot Size - [===
ADXRecovery Settings ===] ADX_UseRecoveryLot = Not_Use_Recovery //ADXUse Recovery Lot Size After Losses - [===
ADXRecovery Settings ===] ADX_MultiRecoveryLot =2.0//ADXMultiplier For Recovery Lot Size - [=== AO
STRATEGY===] AO_StrategyRun =true// AO Strategy Run - [=== AO Signal Parameters ===] AO_OpenOrdersType = 6 // AO Type Of Open
Orders(0=Not Use)(from 1 to 8) - [=== AO Signal Parameters ===] AO_LevelOpenOrders =
55.0// AO Level Open Orders - [=== AO Signal Parameters ===] AO_CloseInSignals =
true// AO Close Orders Via Signals - [=== AO Signal Parameters ===] AO_CloseOrdersType = 8 // AO Type Of Close
Orders(0=Not Use)(from 1 to 8) - [=== AO Signal Parameters ===] AO_LevelCloseOrders =
40.0// AO Level Close Orders - [=== AO Order Management ===] AO_TypeOfLevelsUse = Use_Only_Virtual_Levels // AO Type Of Levels Use To Close Orders
- [=== AO Order Management ===] AO_TakeProfit =
10.0// AO Pips TakeProfit(0=Not Use) - [=== AO Order Management ===] AO_StopLoss =
80.0// AO Pips StopLoss(0=Not Use) - [=== AO Money Management ===] AO_AutoLotSize =
true// AO Auto Money Management - [=== AO Money Management ===] AO_RiskFactor =
1.0// AO Risk Money Management - [=== AO Money Management ===] AO_ManualLotSize =
0.10// AO Manual Lot Size - [=== AO Recovery Settings ===] AO_UseRecoveryLot = Not_Use_Recovery // AO Use Recovery Lot Size After Losses
- [=== AO Recovery Settings ===] AO_MultiRecoveryLot =
2.0// AO Multiplier For Recovery Lot Size - [===
DEMSTRATEGY===]DeM_StrategyRun=true//DeMStrategy Run - [===
DeMIndicator Parameters ===]DeM_BarsCalculate= 20 //DeM_Bars Calculate Signals - [===
DeMSignal Parameters ===]DeM_OpenOrdersType= 3 //DeMType Of OpenOrders(0=Not Use)(from 1 to 4) - [===
DeMSignal Parameters ===]DeM_LevelOpenOrders=75.0//DeMLevel Open Orders - [===
DeMSignal Parameters ===]DeM_CloseInSignals=true//DeMClose Orders Via Signals - [===
DeMSignal Parameters ===]DeM_CloseOrdersType= 4 //DeMType Of CloseOrders(0=Not Use)(from 1 to 4) - [===
DeMSignal Parameters ===]DeM_LevelCloseOrders=70.0//DeMLevel Close Orders - [===
DeMOrder Management ===]DeM_TypeOfLevelsUse= Use_Only_Virtual_Levels //DeMType Of Levels Use To Close Orders - [===
DeMOrder Management ===]DeM_TakeProfit=5.0//DeMPips TakeProfit(0=Not Use) - [===
DeMOrder Management ===]DeM_StopLoss=60.0//DeMPips StopLoss(0=Not Use) - [===
DeMMoney Management ===]DeM_AutoLotSize=true//DeMAuto Money Management - [===
DeMMoney Management ===]DeM_RiskFactor=1.0//DeMRisk Money Management - [===
DeMMoney Management ===]DeM_ManualLotSize=0.10//DeMManual Lot Size - [===
DeMRecovery Settings ===]DeM_UseRecoveryLot= Not_Use_Recovery //DeMUse Recovery Lot Size After Losses - [===
DeMRecovery Settings ===]DeM_MultiRecoveryLot=2.0//DeMMultiplier For Recovery Lot Size - [===
DeMRecovery Settings ===] FBB_StrategyRun =true// EnableFBBStrategy - [===
DeMRecovery Settings ===] FBB_BarsCalculate = 20 //FBBBars to Calculate Signals - [===
DeMRecovery Settings ===] FBB_Deviation =1.8//FBBBollinger Bands Deviation - [===
DeMRecovery Settings ===] FBB_OpenOrdersType_1 = 1 //FBBEntry Signal Type 1 (0=Disabled)(Range 1-2) - [===
DeMRecovery Settings ===] FBB_OpenOrdersType_2 = 8 //FBBEntry Signal Type 2 (0=Disabled)(Range 1-8) - [===
DeMRecovery Settings ===] FBB_LevelOpenOrders_1 =0.0//FBBEntry Level 1 (0=Disabled) - [===
DeMRecovery Settings ===] FBB_LevelOpenOrders_2 =50.0//FBBEntry Level 2 - [===
DeMRecovery Settings ===] FBB_CloseInSignals =false//FBBClose Positions via Signals - [===
DeMRecovery Settings ===] FBB_CloseOrdersType_1 = 1 //FBBExit Signal Type 1 (0=Disabled)(Range 1-2) - [===
DeMRecovery Settings ===] FBB_CloseOrdersType_2 = 4 //FBBExit Signal Type 2 (0=Disabled)(Range 1-8) - [===
DeMRecovery Settings ===] FBB_LevelCloseOrders_1 =40.0//FBBExit Level 1 (0=Disabled) - [===
DeMRecovery Settings ===] FBB_LevelCloseOrders_2 =40.0//FBBExit Level 2 - [===
DeMRecovery Settings ===] FBB_TypeOfLevelsUse = Use_Only_Virtual_Levels //FBBLevel Type for Position Closure - [===
DeMRecovery Settings ===] FBB_TakeProfit =5.0//FBBTakeProfit(pips, 0=Disabled) - [===
DeMRecovery Settings ===] FBB_StopLoss =15.0//FBBStopLoss(pips, 0=Disabled) - [===
DeMRecovery Settings ===] FBB_AutoLotSize =true//FBBEnable Auto Money Management - [===
DeMRecovery Settings ===] FBB_RiskFactor =1.0//FBBRisk Management Factor - [===
DeMRecovery Settings ===] FBB_ManualLotSize =0.10//FBBManual Lot Size - [===
DeMRecovery Settings ===] FBB_UseRecoveryLot = Not_Use_Recovery //FBBRecovery Lot After Losses - [===
DeMRecovery Settings ===] FBB_MultiRecoveryLot =2.0//FBBRecovery Lot Multiplier - [===
DeMRecovery Settings ===] MFI_StrategyRun =true// EnableMFIStrategy - [===
DeMRecovery Settings ===] MFI_BarsCalculate = 12 //MFIBars to Calculate Signals - [===
DeMRecovery Settings ===] MFI_OpenOrdersType = 3 //MFIEntry SignalType(0=Disabled)(Range 1-4) - [===
DeMRecovery Settings ===] MFI_LevelOpenOrders =90.0//MFIEntry Signal Level - [===
DeMRecovery Settings ===] MFI_CloseInSignals =true//MFIClose Positions via Signals - [===
DeMRecovery Settings ===] MFI_CloseOrdersType = 4 //MFIExit SignalType(0=Disabled)(Range 1-4) - [===
DeMRecovery Settings ===] MFI_LevelCloseOrders =90.0//MFIExit Signal Level - [===
DeMRecovery Settings ===] MFI_TypeOfLevelsUse = Use_Only_Virtual_Levels //MFILevel Type for Position Closure - [===
DeMRecovery Settings ===] MFI_TakeProfit =50.0//MFITakeProfit(pips, 0=Disabled) - [===
DeMRecovery Settings ===] MFI_StopLoss =25.0//MFIStopLoss(pips, 0=Disabled) - [===
DeMRecovery Settings ===] MFI_AutoLotSize =true//MFIEnable Auto Money Management - [===
DeMRecovery Settings ===] MFI_RiskFactor =1.0//MFIRisk Management Factor - [===
DeMRecovery Settings ===] MFI_ManualLotSize =0.10//MFIManual Lot Size - [===
DeMRecovery Settings ===] MFI_UseRecoveryLot = Not_Use_Recovery //MFIRecovery Lot After Losses - [===
DeMRecovery Settings ===] MFI_MultiRecoveryLot =2.0//MFIRecovery Lot Multiplier - [===
DeMRecovery Settings ===] MS_StrategyRun =true// Enable MS Strategy - [===
DeMRecovery Settings ===] MS_Fast_EMA_Period = 3 // MSMACDFastEMAPeriod - [===
DeMRecovery Settings ===] MS_Slow_EMA_Period = 9 // MSMACDSlowEMAPeriod - [===
DeMRecovery Settings ===] MS_Signal_Period = 2 // MSMACDSignal Period - [===
DeMRecovery Settings ===] MS_K_Period = 5 // MS Stochastic K Period - [===
DeMRecovery Settings ===] MS_D_Period = 3 // MS Stochastic D Period - [===
DeMRecovery Settings ===] MS_Slowing_Period = 12 // MS Stochastic Slowing Period - [===
DeMRecovery Settings ===] MS_OpenOrdersType_1 = 8 // MS Entry Signal Type 1 (0=Disabled)(Range 1-11) - [===
DeMRecovery Settings ===] MS_OpenOrdersType_2 = 22 // MS Entry Signal Type 2 (0=Disabled)(Range 1-28) - [===
DeMRecovery Settings ===] MS_LevelOpenOrders_1 =60.0// MS Entry Level 1 - [===
DeMRecovery Settings ===] MS_LevelOpenOrders_2 =80.0// MS Entry Level 2 - [===
DeMRecovery Settings ===] MS_CloseInSignals =true// MS Close Positions via Signals - [===
DeMRecovery Settings ===] MS_CloseOrdersType_1 = 9 // MS Exit Signal Type 1 (0=Disabled)(Range 1-11) - [===
DeMRecovery Settings ===] MS_CloseOrdersType_2 = 10 // MS Exit Signal Type 2 (0=Disabled)(Range 1-28) - [===
DeMRecovery Settings ===] MS_LevelCloseOrders_1 =50.0// MS Exit Level 1 - [===
DeMRecovery Settings ===] MS_LevelCloseOrders_2 =65.0// MS Exit Level 2 - [===
DeMRecovery Settings ===] MS_TypeOfLevelsUse = Use_Only_Virtual_Levels // MS Level Type for Position Closure - [===
DeMRecovery Settings ===] MS_TakeProfit =10.0// MS TakeProfit(pips, 0=Disabled) - [===
DeMRecovery Settings ===] MS_StopLoss =45.0// MS StopLoss(pips, 0=Disabled) - [===
DeMRecovery Settings ===] MS_AutoLotSize =true// MS Enable Auto Money Management - [===
DeMRecovery Settings ===] MS_RiskFactor =1.0// MS Risk Management Factor - [===
DeMRecovery Settings ===] MS_ManualLotSize =0.10// MS Manual Lot Size - [===
DeMRecovery Settings ===] MS_UseRecoveryLot = Not_Use_Recovery // MS Recovery Lot After Losses - [===
DeMRecovery Settings ===] MS_MultiRecoveryLot =2.0// MS Recovery Lot Multiplier - [===
ORDERSGRIDSETTINGS===]MakeOrdersGrid= Not_Make_Grid // Make Grid Of Orders - [===
ORDERSGRIDSETTINGS===]PipsBetweenOrders=0.0// Pips Between Orders - [===
ORDERSGRIDSETTINGS===]TimeBetweenOrders= 60 // Seconds Between Orders - [===
TRADINGSESSION===]ControlSession=true// Use Trade Control Session - [===
TRADINGSESSION===]WaitAfterOpen= 60 // Wait After Monday Open - [===
TRADINGSESSION===]StopBeforeClose= 60 // Stop Before Friday Close - [===
CHARTDISPLAY===]ShowComments=true// Show Comments On Chart - [===
CHARTDISPLAY===]ColorOffLines=clrGray// Color Off Lines - [===
CHARTDISPLAY===]ColorExpertName=clrDodgerBlue// Color Expert Name - [===
CHARTDISPLAY===]ColorSpreadInfo=clrLightSkyBlue// Color Spread Information - [===
CHARTDISPLAY===]ColorMoneyMngmnt=clrLightBlue// Color Money Management - [===
CHARTDISPLAY===]ColorCurrentOrders=clrPaleTurquoise// Color Current Orders - [===
CHARTDISPLAY===]ColorHistoryOrders=clrLightCyan// Color History Orders - [===
GENERALEXPERTSETTINGS===]MaxSpread=0.0// Max AcceptedSpread(0=Not Limit) - [===
GENERALEXPERTSETTINGS===]MaxOrders= 0 // Max OpenedOrders(0=No Limit) - [===
GENERALEXPERTSETTINGS===] Slippage = 3 // Accepted Slippage - [===
GENERALEXPERTSETTINGS===]SoundAlert=false// Play Sound Alerts - [===
GENERALEXPERTSETTINGS===]PrintOperations=false//PrintInformation Log - [===
GENERALEXPERTSETTINGS===]MagicNumber= 0 // Orders'ID(0=Generate Automatically) - [===
GENERALEXPERTSETTINGS===]InpTradeComment= "Psgrowth.com Expert_12073" // Orders'Comment
// Pipsgrowth EX12073 MultiIndicatorConfluence — Execution Flow (from source analysis)
// Family: MultiIndicatorConfluence
// Multi-strategy EA combining AC, ADX, AO, DeM, FBB, MFI and MS indicators with grid orders, recovery lot sizing, session control and multi-pair trading support. 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 a chart matching the recommended timeframe
- 7Configure parameters according to the table on this page
- 8Enable Allow Algo Trading and click OK
EA Parameters
| Parameter | Default | Description |
|---|---|---|
| TypeOperation | Normal_Operation | Type Of Operation |
| SetChartUses | true | Set Automatically Chart To Use |
| PairToTrade | TRADE_EURUSD_4 | Symbol Expert Trade |
| TimeFrame | 8 | Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)//Period Of Bars |
| CloseInReverse | true | Close Orders In Reverse Signal |
| TradeAllStrategies | true | Trade All Strategikes Together |
| AC_StrategyRun | true | AC Strategy Run |
| AC_OpenOrdersType | 5 | AC Type Of Open Orders (0=Not Use)(from 1 to 8) |
| AC_LevelOpenOrders | 80.0 | AC Level Open Orders |
| AC_CloseInSignals | true | AC Close Orders With Signals |
| AC_CloseOrdersType | 1 | AC Type Of Close Orders (0=Not Use)(from 1 to 8) |
| AC_LevelCloseOrders | 70.0 | AC Level Close Orders |
| AC_TypeOfLevelsUse | Use_Only_Virtual_Levels | AC Type Of Levels Use To Close Orders |
| AC_TakeProfit | 95.0 | AC Pips Take Profit (0=Not Use) |
| AC_StopLoss | 85.0 | AC Pips Stop Loss (0=Not Use) |
| AC_AutoLotSize | true | AC Auto Money Management |
| AC_RiskFactor | 1.0 | AC Risk Money Management |
| AC_ManualLotSize | 0.10 | AC Manual Lot Size |
| AC_UseRecoveryLot | Not_Use_Recovery | AC Use Recovery Lot Size After Losses |
| AC_MultiRecoveryLot | 2.0 | AC Multiplier For Recovery Lot Size |
| ADX_StrategyRun | true | ADX Strategy Run |
| ADX_BarsCalculate | 20 | ADX Bars Calculate Signals |
| ADX_OpenOrdersType | 2 | ADX Type Of Open Orders (0=Not Use)(from 1 to 4) |
| ADX_LevelOpenOrders_1 | 55.0 | ADX Level Open Orders 1 |
| ADX_LevelOpenOrders_2 | 15.0 | ADX Level Open Orders 2 |
| ADX_CloseInSignals | true | ADX Close Orders With Signals |
| ADX_CloseOrdersType | 4 | ADX Type Of Close Orders (0=Not Use)(from 1 to 4) |
| ADX_LevelCloseOrders_1 | 15.0 | ADX Level Close Orders 1 |
| ADX_LevelCloseOrders_2 | 5.0 | ADX Level Close Orders 2 |
| ADX_TypeOfLevelsUse | Use_Only_Virtual_Levels | ADX Type Of Levels Use To Close Orders |
| ADX_TakeProfit | 35.0 | ADX Pips Take Profit (0=Not Use) |
| ADX_StopLoss | 70.0 | ADX Pips Stop Loss (0=Not Use) |
| ADX_AutoLotSize | true | ADX Auto Money Management |
| ADX_RiskFactor | 1.0 | ADX Risk Money Management |
| ADX_ManualLotSize | 0.10 | ADX Manual Lot Size |
| ADX_UseRecoveryLot | Not_Use_Recovery | ADX Use Recovery Lot Size After Losses |
| ADX_MultiRecoveryLot | 2.0 | ADX Multiplier For Recovery Lot Size |
| AO_StrategyRun | true | AO Strategy Run |
| AO_OpenOrdersType | 6 | AO Type Of Open Orders (0=Not Use)(from 1 to 8) |
| AO_LevelOpenOrders | 55.0 | AO Level Open Orders |
| AO_CloseInSignals | true | AO Close Orders Via Signals |
| AO_CloseOrdersType | 8 | AO Type Of Close Orders (0=Not Use)(from 1 to 8) |
| AO_LevelCloseOrders | 40.0 | AO Level Close Orders |
| AO_TypeOfLevelsUse | Use_Only_Virtual_Levels | AO Type Of Levels Use To Close Orders |
| AO_TakeProfit | 10.0 | AO Pips Take Profit (0=Not Use) |
| AO_StopLoss | 80.0 | AO Pips Stop Loss (0=Not Use) |
| AO_AutoLotSize | true | AO Auto Money Management |
| AO_RiskFactor | 1.0 | AO Risk Money Management |
| AO_ManualLotSize | 0.10 | AO Manual Lot Size |
| AO_UseRecoveryLot | Not_Use_Recovery | AO Use Recovery Lot Size After Losses |
| AO_MultiRecoveryLot | 2.0 | AO Multiplier For Recovery Lot Size |
| DeM_StrategyRun | true | DeM Strategy Run |
| DeM_BarsCalculate | 20 | DeM_ Bars Calculate Signals |
| DeM_OpenOrdersType | 3 | DeM Type Of Open Orders (0=Not Use)(from 1 to 4) |
| DeM_LevelOpenOrders | 75.0 | DeM Level Open Orders |
| DeM_CloseInSignals | true | DeM Close Orders Via Signals |
| DeM_CloseOrdersType | 4 | DeM Type Of Close Orders (0=Not Use)(from 1 to 4) |
| DeM_LevelCloseOrders | 70.0 | DeM Level Close Orders |
| DeM_TypeOfLevelsUse | Use_Only_Virtual_Levels | DeM Type Of Levels Use To Close Orders |
| DeM_TakeProfit | 5.0 | DeM Pips Take Profit (0=Not Use) |
| DeM_StopLoss | 60.0 | DeM Pips Stop Loss (0=Not Use) |
| DeM_AutoLotSize | true | DeM Auto Money Management |
| DeM_RiskFactor | 1.0 | DeM Risk Money Management |
| DeM_ManualLotSize | 0.10 | DeM Manual Lot Size |
| DeM_UseRecoveryLot | Not_Use_Recovery | DeM Use Recovery Lot Size After Losses |
| DeM_MultiRecoveryLot | 2.0 | DeM Multiplier For Recovery Lot Size |
| FBB_StrategyRun | true | Enable FBB Strategy |
| FBB_BarsCalculate | 20 | FBB Bars to Calculate Signals |
| FBB_Deviation | 1.8 | FBB Bollinger Bands Deviation |
| FBB_OpenOrdersType_1 | 1 | FBB Entry Signal Type 1 (0=Disabled)(Range 1-2) |
| FBB_OpenOrdersType_2 | 8 | FBB Entry Signal Type 2 (0=Disabled)(Range 1-8) |
| FBB_LevelOpenOrders_1 | 0.0 | FBB Entry Level 1 (0=Disabled) |
| FBB_LevelOpenOrders_2 | 50.0 | FBB Entry Level 2 |
| FBB_CloseInSignals | false | FBB Close Positions via Signals |
| FBB_CloseOrdersType_1 | 1 | FBB Exit Signal Type 1 (0=Disabled)(Range 1-2) |
| FBB_CloseOrdersType_2 | 4 | FBB Exit Signal Type 2 (0=Disabled)(Range 1-8) |
| FBB_LevelCloseOrders_1 | 40.0 | FBB Exit Level 1 (0=Disabled) |
| FBB_LevelCloseOrders_2 | 40.0 | FBB Exit Level 2 |
| FBB_TypeOfLevelsUse | Use_Only_Virtual_Levels | FBB Level Type for Position Closure |
| FBB_TakeProfit | 5.0 | FBB Take Profit (pips, 0=Disabled) |
| FBB_StopLoss | 15.0 | FBB Stop Loss (pips, 0=Disabled) |
| FBB_AutoLotSize | true | FBB Enable Auto Money Management |
| FBB_RiskFactor | 1.0 | FBB Risk Management Factor |
| FBB_ManualLotSize | 0.10 | FBB Manual Lot Size |
| FBB_UseRecoveryLot | Not_Use_Recovery | FBB Recovery Lot After Losses |
| FBB_MultiRecoveryLot | 2.0 | FBB Recovery Lot Multiplier |
| MFI_StrategyRun | true | Enable MFI Strategy |
| MFI_BarsCalculate | 12 | MFI Bars to Calculate Signals |
| MFI_OpenOrdersType | 3 | MFI Entry Signal Type (0=Disabled)(Range 1-4) |
| MFI_LevelOpenOrders | 90.0 | MFI Entry Signal Level |
| MFI_CloseInSignals | true | MFI Close Positions via Signals |
| MFI_CloseOrdersType | 4 | MFI Exit Signal Type (0=Disabled)(Range 1-4) |
| MFI_LevelCloseOrders | 90.0 | MFI Exit Signal Level |
| MFI_TypeOfLevelsUse | Use_Only_Virtual_Levels | MFI Level Type for Position Closure |
| MFI_TakeProfit | 50.0 | MFI Take Profit (pips, 0=Disabled) |
| MFI_StopLoss | 25.0 | MFI Stop Loss (pips, 0=Disabled) |
| MFI_AutoLotSize | true | MFI Enable Auto Money Management |
| MFI_RiskFactor | 1.0 | MFI Risk Management Factor |
| MFI_ManualLotSize | 0.10 | MFI Manual Lot Size |
| MFI_UseRecoveryLot | Not_Use_Recovery | MFI Recovery Lot After Losses |
| MFI_MultiRecoveryLot | 2.0 | MFI Recovery Lot Multiplier |
| MS_StrategyRun | true | Enable MS Strategy |
| MS_Fast_EMA_Period | 3 | MS MACD Fast EMA Period |
| MS_Slow_EMA_Period | 9 | MS MACD Slow EMA Period |
| MS_Signal_Period | 2 | MS MACD Signal Period |
| MS_K_Period | 5 | MS Stochastic K Period |
| MS_D_Period | 3 | MS Stochastic D Period |
| MS_Slowing_Period | 12 | MS Stochastic Slowing Period |
| MS_OpenOrdersType_1 | 8 | MS Entry Signal Type 1 (0=Disabled)(Range 1-11) |
| MS_OpenOrdersType_2 | 22 | MS Entry Signal Type 2 (0=Disabled)(Range 1-28) |
| MS_LevelOpenOrders_1 | 60.0 | MS Entry Level 1 |
| MS_LevelOpenOrders_2 | 80.0 | MS Entry Level 2 |
| MS_CloseInSignals | true | MS Close Positions via Signals |
| MS_CloseOrdersType_1 | 9 | MS Exit Signal Type 1 (0=Disabled)(Range 1-11) |
| MS_CloseOrdersType_2 | 10 | MS Exit Signal Type 2 (0=Disabled)(Range 1-28) |
| MS_LevelCloseOrders_1 | 50.0 | MS Exit Level 1 |
| MS_LevelCloseOrders_2 | 65.0 | MS Exit Level 2 |
| MS_TypeOfLevelsUse | Use_Only_Virtual_Levels | MS Level Type for Position Closure |
| MS_TakeProfit | 10.0 | MS Take Profit (pips, 0=Disabled) |
| MS_StopLoss | 45.0 | MS Stop Loss (pips, 0=Disabled) |
| MS_AutoLotSize | true | MS Enable Auto Money Management |
| MS_RiskFactor | 1.0 | MS Risk Management Factor |
| MS_ManualLotSize | 0.10 | MS Manual Lot Size |
| MS_UseRecoveryLot | Not_Use_Recovery | MS Recovery Lot After Losses |
| MS_MultiRecoveryLot | 2.0 | MS Recovery Lot Multiplier |
| MakeOrdersGrid | Not_Make_Grid | Make Grid Of Orders |
| PipsBetweenOrders | 0.0 | Pips Between Orders |
| TimeBetweenOrders | 60 | Seconds Between Orders |
| ControlSession | true | Use Trade Control Session |
| WaitAfterOpen | 60 | Wait After Monday Open |
| StopBeforeClose | 60 | Stop Before Friday Close |
| ShowComments | true | Show Comments On Chart |
| ColorOffLines | clrGray | Color Off Lines |
| ColorExpertName | clrDodgerBlue | Color Expert Name |
| ColorSpreadInfo | clrLightSkyBlue | Color Spread Information |
| ColorMoneyMngmnt | clrLightBlue | Color Money Management |
| ColorCurrentOrders | clrPaleTurquoise | Color Current Orders |
| ColorHistoryOrders | clrLightCyan | Color History Orders |
| MaxSpread | 0.0 | Max Accepted Spread (0=Not Limit) |
| MaxOrders | 0 | Max Opened Orders (0=No Limit) |
| Slippage | 3 | Accepted Slippage |
| SoundAlert | false | Play Sound Alerts |
| PrintOperations | false | Print Information Log |
| MagicNumber | 0 | Orders' ID (0=Generate Automatically) |
| InpTradeComment | "Psgrowth.com Expert_12073" | Orders' Comment |
#property copyright "Pipsgrowth.com"
#property link "https://pipsgrowth.com"
#property version "2.00"
#property strict
#property description "Pipsgrowth.com EX12073 MultiStrategyEA_v1_2 — Multi-strategy EA (AC+ADX+AO+DeM+FBB+MFI+MS), full 12-layer stack."
#include <Trade\Trade.mqh>
//============================================================================================================================================================================================================================//
#define MagicSet 22212073
//============================================================================================================================================================================================================================//
enum Oper {Stand_by_Mode, Normal_Operation, Close_Immediately_All_Orders};
enum Grid {Not_Make_Grid, Make_Grid_In_Loss, Make_Grid_In_Profit, Make_Grid_Loss_And_Profit};
enum Levels {Use_Only_Hard_Levels, Use_Only_Virtual_Levels, Use_Hard_And_Virtual_Levels};
enum LotPr {Statical_Lot, Geometrical_Lot, Exponetial_Lot};
enum Recov {Not_Use_Recovery, Use_Last_Closing, Use_Higher_Profits};
enum Pair {CHART_PAIR, TRADE_EURGBP_1, TRADE_EURAUD_2, TRADE_EURNZD_3, TRADE_EURUSD_4, TRADE_EURCAD_5, TRADE_EURCHF_6, TRADE_EURJPY_7,
TRADE_GBPAUD_8, TRADE_GBPNZD_9, TRADE_GBPUSD_10, TRADE_GBPCAD_11, TRADE_GBPCHF_12, TRADE_GBPJPY_13, TRADE_AUDNZD_14,
TRADE_AUDUSD_15, TRADE_AUDCAD_16, TRADE_AUDCHF_17, TRADE_AUDJPY_18, TRADE_NZDUSD_19, TRADE_NZDCAD_20, TRADE_NZDCHF_21,
TRADE_NZDJPY_22, TRADE_USDCAD_23, TRADE_USDCHF_24, TRADE_USDJPY_25, TRADE_CADCHF_26, TRADE_CADJPY_27, TRADE_CHFJPY_28
};
//============================================================================================================================================================================================================================//
//Common parameters
//============================================================================================================================================================================================================================//
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_TIMEFRAMES g_TimeFrame = PERIOD_H1;
input group "=== OPERATION SETTINGS ==="
input Oper TypeOperation = Normal_Operation;//Type Of Operation
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_TIMEFRAMES g_TimeFrame = PERIOD_H1;
input group "=== CHART & SYMBOL SETTINGS ==="
input bool SetChartUses = true;//Set Automatically Chart To Use
input Pair PairToTrade = TRADE_EURUSD_4;//Symbol Expert Trade
ENUM_TIMEFRAMES MapTimeframeInt(int tf)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 Other strategy EAs from our library
Pipsgrowth EX01007 Adaptive
Pipsgrowth.com EX01007 Adaptive XAUUSD 5M — multi-indicator signal scorer with regime filter, full 12-layer stack, configurable timeframe, trailing/BE/profit-lock toggles, pyramid gate, spread filter, new-bar gate, filling mode detection.
Pipsgrowth EX01019 Adaptive
Pipsgrowth.com EX01019 Self-Adaptive Market EA Fixed — multi-regime adaptive EA, full 12-layer stack.
Pipsgrowth EX15029 SMC-OrderBlock
Pipsgrowth.com EX15029 SMCBreakoutEA — SMC breakout CHOCH/liquidity sweep EA, full 12-layer stack.
Community
Educational purposes only. Do NOT use with real money. Test on demo accounts only.