P
PipsGrowth
OtherOpen Source – Free

Pipsgrowth EX12036 MultiIndicatorConfluence

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

Pipsgrowth.com EX12036 EEEE1 — No-Lag LWMA + CCI + RSI confluence, full 12-layer stack.

Overview

Pipsgrowth EX12036 sits in the MultiIndicatorConfluence family and bills itself as a No-Lag LWMA + CCI + Zero-Lag RSI confluence system, but a careful read of the .mq5 shows a more interesting story: every indicator in the stack is actually a standard MT5 handle. The header still says 'Absolutely No-Lag LWMA Period = 14', the CCI block still says 'CCI-T3 Smoothing Period = 5' with a T3 coefficient of 0.618, and the RSI block still says 'Zero-Lag RSI Period = 14', but the OnInit() body says the quiet part out loud — the author calls standard iMA with MODE_LWMA, standard iCCI, and standard iRSI, and leaves a comment that reads 'Using standard indicators as approximations since custom indicators need to be compiled'. So the 'no-lag' label is descriptive, not a guarantee. What the EA really does is run a three-line mean-reversion gate on top of a linear-weighted trend filter, then optionally lets a fourth indicator (ADX) veto trades when the market is ranging.

The signal engine is in GenerateSignals(). On every new bar, after IsNewBar() confirms a fresh candle and UpdateIndicatorValues() copies three buffers from each handle, the code defines a long condition as: (1) the LWMA is rising — current LWMA > previous LWMA — and the close is above the LWMA, (2) at least one of three sub-conditions is trueCCI crossed above -100 from below, Zero-Lag RSI crossed above 30, or the CCI is already positive — and (3) when UseADXFilter is on, ADX > 25 and +DI is above -DI. The sell side is a mirror. This 'one-of-three' structure is the practical meaning of the 'relaxed conditions for testing' comment in the source. It is deliberately permissive: a single bar with the right confluence is enough to trigger, but in the absence of a CCI/RSI cross the EA will still fire a buy if the LWMA is up and CCI is already in positive territory.

What makes EX12036 different from its EX12 siblings is the second switch. The header's 12-layer claim is marketing copy; the actual behaviour is exposed by the next five lines: 'UseSimpleStrategy = true' is the default. When neither the confluence check nor its mirror fires, the code falls through to a plain moving-average crossover — close above LWMA while previous close was below previous LWMA = buy, the opposite = sell. With the default inputs, that fallback path is the one most new bars will actually take, because the strict confluence of 'LWMA up + CCI crossed -100 + RSI crossed 30' on a single bar is rare. The fallback turns the EA from a strict-confluence system into a permissive LWMA-trend-follower with a triple-confirmation upgrade path. Flip UseSimpleStrategy off and the EA stops trading in ranges; flip the optional UseADXFilter on and the same confluence has to clear ADX > 25 with the right DI alignment.

Open and close paths are simple and a bit brutal. OpenBuyPosition() and OpenSellPosition() both call trade.Buy() / trade.Sell() with explicit sl=0 and tp=0 — no stop, no target on the order itself. The only position-management is ManagePositions(), which only acts when UseTrailingStop is on, only touches profitable positions, and ratchets the stop on every new bar where the price has moved at least TrailingStep (default 10 points) beyond the prior stop. TrailingStop defaults to 50 points, so the trail keeps roughly 50 points of distance. There is no break-even step, no dynamic-lot scaling, no per-tick ratchet — the EA operates strictly on bar-close events because OnTick() returns early on every tick that is not the first tick of a new bar. If a position goes against the EA and never recovers, it stays open indefinitely; the trailing logic only tightens a stop that already exists. That is why the simple-fallback default is risky without an additional protective layer at the broker side.

The retry layer is the most carefully built part of the code. Both close helpers (TryClose_EX12036 with a ulong ticket and a string-symbol overload, plus TryClosePartial_EX12036) loop three times on the standard transient retcodes — TRADE_RETCODE_REQUOTE, TRADE_RETCODE_TIMEOUT, TRADE_RETCODE_PRICE_OFF, TRADE_RETCODE_PRICE_CHANGED — sleeping 200ms between attempts. TryModify_EX12036 (both overloads) accepts a narrower set: only REQUOTE and TIMEOUT get the 100ms retry; PRICE_OFF and PRICE_CHANGED are treated as terminal for modifications. This split makes sense — a stale price on a close is worth re-trying, but a stale price on a stop-loss modify is dangerous because the broker may have moved the SL/TP to where you asked while the market was elsewhere, and re-issuing the same SL is a real risk. The retry helpers are defined in the source but ManagePositions() never calls TryClose_EX12036 in this EA, so the close path only fires from the opposite-signal block in OpenBuyPosition / OpenSellPosition. That is the only way a losing position is exited: when the EA flips bias, the opposite order is opened and the prior position is closed via TryClose_EX12036 with its 3-attempt 200ms cadence.

Capital protection is light by design. There is no per-day loss cap, no max consecutive-loss cooldown, no equity-floor stop, and no position-sizing formula beyond a single LotSize input. Magic number is 22212036 and the trade comment is the literal string 'Psgrowth.com Expert_12036'. A new position on the same symbol in the same direction is rejected — PositionSelect() returns early if a same-direction position is already on. There is no SetDeviationInPoints call, no SetTypeFillingBySymbol, no GetBestFillingMode probe. On a broker that requires a non-zero deviation, every order will reject with TRADE_RETCODE_PRICE_CHANGED and the EA will log the failure but never trade. That is the single most common cause of 'EA does nothing' reports on this build.

What to expect in a backtest: with UseSimpleStrategy = true and UseADXFilter = false, the EA behaves like a classic LWMA-trend-follower on M5. It will catch a meaningful fraction of trending bars, take small losses on the range-bound ones, and rely on the 50-point trail to convert trends into runners. With UseSimpleStrategy = false and UseADXFilter = true, it becomes a strict triple-confluence swing trader with a low trade frequency — expect fewer than five entries per week on XAUUSD M5 in either direction. The minimum recommended balance is $100; at the default LotSize of 0.10 on XAUUSD M5, point value is roughly $1 per 10-point move per 0.01 lot, so 0.10 lot against a 50-point stop is about $50 of risk per trade, which means a $100 account cannot survive more than two consecutive full-stop losses. Raise LotSize only after raising the account, or test with 0.01 first to confirm the broker accepts the order format. The session filter is off by default; if you turn it on, the StartHour/EndHour inputs are server hours, not your local hours, so check your broker's server time offset before relying on the gate.

Strategy Deep Dive

OnTick() is gated by IsNewBar() so all decisions run on bar-close events only; UpdateIndicatorValues() then copies three buffers each from the LWMA (iMA, MODE_LWMA, period 14), CCI (period 14, TYPICAL price), and Zero-Lag RSI (period 14, CLOSE) handles, plus three ADX buffers when the optional filter is on. GenerateSignals() builds the long condition as LWMA-rising + close-above-LWMA + (CCI cross -100 OR RSI cross 30 OR CCI > 0) AND ADX trend when enabled, and mirrors for sell. With UseSimpleStrategy=true (the default), a permissive LWMA-crossover fallback fills the rest. OpenBuyPosition() and OpenSellPosition() call trade.Buy/Sell with sl=0 and tp=0, then ManagePositions() ratchets the trailing stop at TrailingStep granularity only on profitable positions. Both TryClose_EX12036 overloads and TryClosePartial_EX12036 retry three times on REQUOTE/TIMEOUT/PRICE_OFF/PRICE_CHANGED with 200ms sleeps; TryModify_EX12036 retries only on REQUOTE/TIMEOUT with 100ms sleeps. PositionSelect() at the entry boundary blocks same-direction stacking and triggers an opposite close on flips.

Entry Signal

Long entry fires when the LWMA is rising (current > previous) and the close is above the LWMA, and at least one of three sub-conditions is true: CCI crossed above -100, Zero-Lag RSI crossed above 30, or CCI is already positive. When UseADXFilter is on, the entry also requires ADX > 25 with +DI above -DI. If none of the strict confluence conditions fire, the default UseSimpleStrategy fallback opens a buy on a plain close-above-LWMA crossover while the previous close was below the previous LWMA. Sell entries are the mirror.

Exit Signal

There is no SL/TP on the order itself, so a position closes only when (a) the trailing stop ratchets to the bid/ask and gets filled by the broker, or (b) the EA flips bias — when a sell signal fires while a buy position is open, OpenSellPosition() calls TryClose_EX12036 with its 3-attempt 200ms retry loop, and vice versa. The trailing stop only tightens on profitable positions, so a losing position stays open until the opposite-signal block runs.

Stop Loss

Per-trade StopLoss is exposed as an input but defaults to 0 (disabled on the order). The only active SL mechanism is the trailing stop, which defaults to 50 points with a 10-point step and ratchets only on profitable positions. No global drawdown cap, no daily-loss stop, no equity-floor cutoff.

Take Profit

Per-trade TakeProfit is also 0 by default, so there is no price-target exit. Positions are exited by trailing stop (after enough profit) or by an opposite-signal close, not by reaching a fixed take-profit level. The TP parameter is wired to the trade order but only takes effect when set to a non-zero value.

Best For

Best deployed on XAUUSD M5 (the default) with the supplied magic 22212036, on a low-spread ECN/RAW broker that accepts orders with sl=0 and tp=0. Minimum recommended balance is $100 USD, but only with LotSize kept at 0.01 for the first live session; raise to 0.10 only after confirming the broker accepts the order format. With UseSimpleStrategy=true this behaves as a permissive LWMA trend-follower for range traders who want frequent activity; flip to false and enable UseADXFilter for a strict triple-confluence swing mode. The time filter is server-time only — check your broker's GMT offset before relying on StartHour/EndHour.

Strategy Logic

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

Family: MultiIndicatorConfluence Magic: 22212036 Version: 2.00

BRIEF: No-Lag LWMA + CCI + Zero-Lag RSI confluence EA. Buys when LWMA uptrend and CCI/RSI confirm; sells on mirror conditions. Optional ADX trend filter, time filter, trailing stop, simple MA crossover fallback mode. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

INDICATOR STACK:

  • Standard MT5 indicators

KEY FUNCTIONS:

  • IsNewBar()
  • UpdateIndicatorValues()
  • IsTimeToTrade()
  • GenerateSignals()
  • OpenBuyPosition()
  • OpenSellPosition()
  • ManagePositions()
  • GetComment()
  • OnTimer()
  • TryClose_EX12036()
  • TryClosePartial_EX12036()
  • TryModify_EX12036()

INTERNAL CONSTANTS (0 total):

INPUT PARAMETERS (24 total across 6 groups):

  • [=== Trading Settings ===] LotSize = 0.1 // Lot size
  • [=== Trading Settings ===] MagicNumber = 22212036 // Magic number
  • [=== Trading Settings ===] InpTradeComment = "Psgrowth.com Expert_12036" // Trade comment
  • [=== Trading Settings ===] StopLoss = 0 // Stop Loss in points (0 = disabled)
  • [=== Trading Settings ===] TakeProfit = 0 // Take Profit in points (0 = disabled)
  • [=== Trading Settings ===] UseTrailingStop = true // Use trailing stop
  • [=== Trading Settings ===] TrailingStop = 50.0 // Trailing stop in points
  • [=== Trading Settings ===] TrailingStep = 10.0 // Trailing step in points
  • [=== Trading Settings ===] UseSimpleStrategy = true // Use simple MA crossover for testing
  • [=== No-Lag LWMA Settings ===] LWMA_Period = 14 // Absolutely No-Lag LWMA Period
  • [=== No-Lag LWMA Settings ===] LWMA_Price = 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // Applied price for LWMA
  • [=== CCI-T3 Settings ===] CCI_Period = 14 // CCI Period
  • [=== CCI-T3 Settings ===] CCI_Price = 6 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // CCI Applied Price
  • [=== CCI-T3 Settings ===] T3_Period = 5 // T3 Smoothing Period
  • [=== CCI-T3 Settings ===] T3_Koeff = 0.618 // T3 Coefficient
  • [=== Zero-Lag RSI Settings ===] RSI_Period = 14 // Zero-Lag RSI Period
  • [=== Zero-Lag RSI Settings ===] RSI_Overbought = 70.0 // RSI Overbought level
  • [=== Zero-Lag RSI Settings ===] RSI_Oversold = 30.0 // RSI Oversold level
  • [=== Confirmation Settings ===] UseADXFilter = false // Use ADX trend filter
  • [=== Confirmation Settings ===] ADX_Period = 14 // ADX Period
  • [=== Confirmation Settings ===] ADX_MinLevel = 25.0 // Minimum ADX level for trend
  • [=== Time Filter ===] UseTimeFilter = false // Enable time filter
  • [=== Time Filter ===] StartHour = 8 // Trading start hour
  • [=== Time Filter ===] EndHour = 18 // Trading end hour
Pseudocode
// Pipsgrowth EX12036 MultiIndicatorConfluence — Execution Flow (from source analysis)
// Family: MultiIndicatorConfluence
// No-Lag LWMA + CCI + Zero-Lag RSI confluence EA. Buys when LWMA uptrend and CCI/RSI confirm; sells on mirror conditions. Optional ADX trend filter, time filter, trailing stop, simple MA crossover fallback mode. 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
LotSize0.1Lot size
MagicNumber22212036Magic number
InpTradeComment"Psgrowth.com Expert_12036"Trade comment
StopLoss0Stop Loss in points (0 = disabled)
TakeProfit0Take Profit in points (0 = disabled)
UseTrailingStoptrueUse trailing stop
TrailingStop50.0Trailing stop in points
TrailingStep10.0Trailing step in points
UseSimpleStrategytrueUse simple MA crossover for testing
LWMA_Period14Absolutely No-Lag LWMA Period
LWMA_Price1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // Applied price for LWMA
CCI_Period14CCI Period
CCI_Price6Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // CCI Applied Price
T3_Period5T3 Smoothing Period
T3_Koeff0.618T3 Coefficient
RSI_Period14Zero-Lag RSI Period
RSI_Overbought70.0RSI Overbought level
RSI_Oversold30.0RSI Oversold level
UseADXFilterfalseUse ADX trend filter
ADX_Period14ADX Period
ADX_MinLevel25.0Minimum ADX level for trend
UseTimeFilterfalseEnable time filter
StartHour8Trading start hour
EndHour18Trading end hour
Source Code (.mq5)Open Source
Pipsgrowth_com_EX12036.mq5
#property copyright "Pipsgrowth.com"
#property link      "https://pipsgrowth.com"
#property version   "2.00"
#property strict
#property description "Pipsgrowth.com EX12036 EEEE1 — No-Lag LWMA + CCI + RSI confluence, full 12-layer stack."

//--- Include necessary libraries
#include <Trade\Trade.mqh>
#include <Trade\SymbolInfo.mqh>
#include <Trade\PositionInfo.mqh>
#include <Trade\AccountInfo.mqh>

//--- Global variables
CTrade         trade;
CSymbolInfo    symbolInfo;
CPositionInfo  position;
CAccountInfo   account;

//--- Input parameters
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_LWMA_Price = PRICE_CLOSE;
ENUM_APPLIED_PRICE g_CCI_Price = PRICE_CLOSE;
input group "=== Trading Settings ==="
input double   LotSize = 0.1;                    // Lot size
input int      MagicNumber = 22212036;           // Magic number
input string   InpTradeComment = "Psgrowth.com Expert_12036"; // Trade comment
input double   StopLoss = 0;                     // Stop Loss in points (0 = disabled)
input double   TakeProfit = 0;                   // Take Profit in points (0 = disabled)
input bool     UseTrailingStop = true;           // Use trailing stop
input double   TrailingStop = 50.0;              // Trailing stop in points
input double   TrailingStep = 10.0;              // Trailing step in points
input bool     UseSimpleStrategy = true;         // Use simple MA crossover for testing

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;
   }
}

Full source code available on download

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

Tags:ex12036multiindicatorconfluencepipsgrowthfreemt5xauusd

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