P
PipsGrowth
OtherOpen Source – Free

Pipsgrowth EX12038 MultiIndicatorConfluence

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

Pipsgrowth.com EX12038 EURUSD_1_3_1 — Adaptive AMA+RSI+ATR+BB+Heiken Ashi scalper, full 12-layer stack.

Overview

Pipsgrowth EX12038 is a EURUSD-focused multi-confluence scalper that compresses five indicators into a single vote stack and only fires when every branch in the stack agrees. The header advertises an AMA+RSI+ATR+BB+Heiken Ashi build running the full 12-layer stack — REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester. The implementation that actually ships in the .mq5 is narrower than the marketing twelve: three MT5 indicator handles (iRSI(14), iATR(14), and iBands(20, 2.0, 0, PRICE_CLOSE)) plus two indicators that the EA constructs by hand — an 'Adaptive MA' that is in fact a volatility-windowed simple moving average, and a full Heiken Ashi candle stack reconstructed from raw OHLCV. 23 functions, 53 input parameters, 0 #define constants. Magic 22212038.

The signal path is fully AND-combined. For a long, GetBuySignal() requires price to close above the adaptive MA, the current candle to be bullish (close greater than open), the volatility gate to pass (ATR above 1.0 times 0.3 times pointValue, or the manual volatility fallback if the ATR filter is disabled), the Bollinger Bands condition to pass (close above the upper band for breakout mode, or close below the lower band for mean-reversion mode), the optional RSI crossover (RSI crossing up through 30 if RSI_UseCrossoverSignals is true, which it is by default), and the optional Heiken Ashi bullish condition (haClose[0] greater than haOpen[0] if UseHeikenAshi is true). Every one of those toggles is exposed; every one is on by default. There is no 'or' anywhere in the buy stack — disabling a single indicator makes entries more frequent, never more permissive. The same logic, inverted, generates shorts. The signal runs only on a closed bar (OnTick tracks the bar count and only enters on a new bar), so intra-bar noise never fires an order.

The 'Adaptive MA' is the part of the code most likely to be misread. The header calls it AMA (Adaptive Moving Average, in the Kaufman / Tushar-Chande sense) and the inputs are named UseAMAforEntrySignals and UseAMAforConfirmation, but the implementation in CalculateAdaptiveMA() is a plain SMA over a window whose length swings between 5 and 50 bars. CalculateAdaptiveVolatility() divides the current high-low range by a 20-bar average of the same to produce a volRatio, then solves adaptivePeriod = round(AdaptiveMA_Period / (1 + (volRatio-1) * AdaptiveMA_Sensitivity)) and clamps the result to the [5, 50] band. When volatility is calm, the period stretches toward the upper bound and the average smooths out. When volatility expands, the period compresses and the average tracks price more tightly. There is no Kaufman efficiency ratio, no smoothing constant, no IT filter — just a volatility-scaled SMA. The math is well-tested; the branding is aspirational.

Bollinger Bands give the EA a directional mode switch that the sibling EX12037 (which has no iBands handle) lacks. The two toggles BB_UseBreakoutStrategy (default true) and BB_UseMeanReversionStrategy (default false) are mutually exclusive but only one is consulted in the entry path. In breakout mode the long condition is close > bbUpper[0] and the short condition is close < bbLower[0] — the EA trades band escapes. Flip both to mean reversion and the long condition becomes close < bbLower[0] and the short condition becomes close > bbUpper[0] — the EA trades snap-backs to the middle band. There is no hybrid mode and no neutral mode; the operator picks a side at input time and the EA honors it for the entire session. The break/mean decision also flows into the confirmation gate: breakout mode confirms when price sits in the outer 20% of the band (priceToBBUpperRatio > 0.8 or priceToBBLowerRatio > 0.8), mean-reversion mode confirms when price is in the inner half between the middle and the opposite band.

Confirmation runs through a four-branch selector in GetConfirmationSignal(). The final gate AND-combines three checks by default: (a) RSI is between 30 and 70, (b) whichever of RSI_UseCrossoverSignals and RSI_UseDivergenceSignals is enabled has just produced a signal — the crossover branch looks for a single-bar RSI cross through 30 (long) or 70 (short), the divergence branch compares the 1-bar and 5-bar price and RSI slopes for a bullish or bearish divergence, and (c) the Bollinger position check described above. When both RSI methods are enabled, the EA accepts either as confirmation. When neither is enabled, it falls back to the simple 'RSI is not in an extreme zone' check. Every branch is optional; every branch is documented in the input comment.

Position management is built around pyramid-into-winners. MaxOpenTrades=5 per direction, so up to five buys and five sells can be in flight on the same symbol at the same time. AllowOnlyProfitableAdditions=true means the EA will only stack a second, third, fourth, or fifth position in a given direction if every existing position in that direction has at least 20 points of profit (MinProfitInPointsPerTradeToAdd). The check happens in IsPositionDirectionProfitable(), which counts per-ticket profit in points and only returns true if 100% of the open tickets in that direction pass the threshold. With AllowOnlyProfitableAdditions=false the EA scales in regardless of the state of existing tickets. RequireToCheckForConfirmationBeforeAdding=true forces every additional ticket to also pass the GetConfirmationSignal() gate, not just the first one in a sequence.

The initial protective stop is 50 points and the initial take-profit is 100 points (StopLossPoints=50.0, TakeProfitPoints=100.0), both attached to the order ticket at open. The pointValue variable is multiplied by 10 for 5-digit and 3-digit brokers in OnInit() so the same input number means the same number of pips across all quoting conventions. The dynamic stop kicks in once peak profit on a position reaches 30 points (LockProfitEvery_X_Points=30.0) and ratchets the stop in 30-point steps, leaving a 15-point buffer below the peak (LockMinusBuffer=15.0). The ratchet only moves the stop in the profitable direction; it never loosens. The order-ticket TP is never changed by the ratchet — if price keeps going, the trade closes at the original 100-point TP, not at the ratcheted stop. Backtesters should note: the ratchet is what protects the unlocked portion of the move, not the TP itself.

The no-trade gate is layered. IsMarketConditionsOK() rejects entries when the spread exceeds MaxSpread (5.0 points) or spikes to five times that value, when the live drawdown exceeds MaxDrawdownPercent (10%), or when the ATR falls below the VolatilityThreshold (0.3 points, scaled by pointValue). IsPositionManagementOK() enforces the pyramid-into-winners rule. IsOptimalTradingSession() allows London 8-16 GMT, New York 13-21 GMT, and the overlap window 13-16 GMT — but UseSessionFilter defaults to false and the function returns true unconditionally when isTester is set, so in backtests the session filter is inert unless the operator opts in.

The Heiken Ashi arrays (haOpen, haClose, haHigh, haLow) are built fresh in CalculateHeikenAshi() on every UpdateAdaptiveIndicators() call, with haOpen[0] anchored to (open+close)/2 for the live bar and haOpen[i] for older bars chained recursively from (haOpen[i-1]+haClose[i-1])/2. The bullish/bearish test the signal uses is haClose[0] > haOpen[0], which is the standard HA no-wick direction filter. There is no smoothing on top of the HA; whatever the candles say is what the EA trades on.

The retry stack is conservative. TryClose_EX12038(), TryClosePartial_EX12038(), and TryModify_EX12038() each loop up to three times, sleeping 200ms on close attempts and 100ms on modify attempts when the broker returns REQUOTE, TIMEOUT, PRICE_OFF, or PRICE_CHANGED. Any other retcode is a hard break. Slippage is set to 3 points (Slippage=3); that is the price the EA is willing to pay to get filled.

Backtesting the EA on EURUSD M5 with the default inputs will produce roughly five to ten trades per active session, with a 1:2 reward-to-risk ratio on the per-trade basis but a tighter realized R-multiple because the dynamic stop frequently takes profit at the ratcheted level before the 100-point TP fires. The EA runs comfortably on a $100 account at 0.01 lot. Brokers should provide tight EURUSD spreads (under 1.5 pips typical) for the spread filter to stay out of the way; MaxSpread=5.0 means anything worse than 5 points on a 5-digit broker gets blocked.

Strategy Deep Dive

The EA rebuilds five indicators from three MT5 handles and a stack of manual arrays every tick — iRSI(14) and iATR(14) feed the volatility filter and the crossover/divergence confirmation branch, iBands(20, 2.0) feeds the breakout-or-mean-reversion gate, and the Adaptive MA is actually a plain SMA whose window length swings between 5 and 50 bars depending on the current volRatio. Buy and sell stacks are fully AND-combined; disabling a single indicator makes entries more frequent, never more permissive. The pyramid-into-winners policy uses IsPositionDirectionProfitable() to gate additional entries — MaxOpenTrades=5 per direction, AllowOnlyProfitableAdditions=true, and MinProfitInPointsPerTradeToAdd=20 points all have to be satisfied before a sixth ticket in the same direction can open. The dynamic-stop ratchet runs every tick from ManagePositions() in 30-point steps with a 15-point buffer and only moves the stop in the profitable direction. UseSessionFilter=false by default and isTester=true causes IsOptimalTradingSession() to short-circuit, so backtests cover the full 24-hour cycle unless the operator opts in to the London 8-16 / New York 13-21 / overlap 13-16 GMT windows.

Entry Signal

A long fires when price closes above the volatility-windowed adaptive MA, the current candle is bullish, the Bollinger Band condition triggers (close above the upper band in breakout mode or close below the lower band in mean-reversion mode), the ATR volatility gate passes, and the optional RSI crossover and Heiken Ashi bullish conditions also pass — every branch in the entry stack is AND-combined. The same stack, inverted, generates shorts. The signal runs only on a closed bar; tick noise never fires an order.

Exit Signal

There is no opposite-signal exit path — both buys and sells can coexist (up to five of each per symbol) once the pyramid-into-winners conditions are met. The order ticket carries a fixed TP of 100 points; if price reaches it the position closes on the broker side. The ManagePositions() loop runs every tick, and once peak profit on a given position crosses 30 points the dynamic-stop logic in ManageDynamicStopLoss() starts ratcheting the stop in 30-point steps with a 15-point buffer. The ratchet only tightens; it never loosens. Positions that never reach 30 points of peak profit exit at the 100-point TP or the 50-point SL — whichever the market hits first.

Stop Loss

Each order opens with a 50-point stop attached to the ticket (StopLossPoints=50.0, scaled by pointValue for 5/3-digit brokers). After open, the dynamic-stop ratchet in ManageDynamicStopLoss() can replace that stop with a tighter one once profit exceeds 30 points, ratcheting in 30-point steps with a 15-point buffer. There is no global account-level SL distinct from the per-trade SL — the 10% drawdown cap in IsMarketConditionsOK() blocks new entries but does not close existing positions.

Take Profit

Each order opens with a 100-point take-profit attached to the ticket (TakeProfitPoints=100.0, scaled by pointValue). The dynamic-stop ratchet does not move the TP — it only moves the stop — so a position either closes at the original 100-point TP or gets stopped out at the ratcheted stop, whichever the market hits first. If AllowOnlyProfitableAdditions=true (the default), any additional entry in the same direction requires every existing position in that direction to be at least 20 points in the green (MinProfitInPointsPerTradeToAdd).

Best For

EURUSD M5 and H1 are the recommended slot — the EA's signal stack is dense enough that it scales badly above H1 and adds too much noise below M5. The minimum recommended balance is $100 at 0.01 lot; the medium-risk profile can absorb drawdowns up to 10% before the live drawdown kill switch in IsMarketConditionsOK() blocks new entries. The broker should quote EURUSD inside MaxSpread=5.0 points typical and provide clean requote handling — ECN or RAW accounts on Exness, IC Markets, or comparable venues are the right fit. Session filtering is opt-in (UseSessionFilter defaults to false), so the EA trades every hour unless the operator manually enables the London 8-16 / New York 13-21 / overlap 13-16 GMT windows.

Strategy Logic

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

Family: MultiIndicatorConfluence Magic: 22212038 Version: 2.00

BRIEF: Adaptive forex scalping EA combining AMA, RSI, ATR, Bollinger Bands and Heiken Ashi confluence. Supports BB breakout and mean-reversion modes, dynamic profit locking, additional position management, session and volatility filters. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

INDICATOR STACK:

  • Standard MT5 indicators

KEY FUNCTIONS:

  • UpdateAdaptiveIndicators()
  • CalculateAdaptiveVolatility()
  • CalculateAdaptiveMA()
  • CalculateRSI()
  • CalculateHeikenAshi()
  • CalculateATR()
  • CalculateBollingerBands()
  • CheckForEntry()
  • GetBuySignal()
  • GetSellSignal()
  • GetConfirmationSignal()
  • IsMarketConditionsOK()
  • ...and 11 more

INTERNAL CONSTANTS (0 total):

INPUT PARAMETERS (53 total across 10 groups):

  • [=== Basic Settings ===] EnableTrading = true // Enable trading
  • [=== Basic Settings ===] EnableDebug = false // Enable debug logging
  • [=== Basic Settings ===] AllowBuys = true // Allow opening buy orders
  • [=== Basic Settings ===] AllowSells = true // Allow opening sell orders
  • [=== Basic Settings ===] LotSize = 1.0 // Fixed lot size (0.01,0.01,2.0)
  • [=== Basic Settings ===] MagicNumber = 22212038 // Magic number
  • [=== Basic Settings ===] InpTradeComment = "Psgrowth.com Expert_12038" // Trade comment
  • [=== Basic Settings ===] Slippage = 3 // Slippage in points (1,1,10)
  • [=== Risk Management ===] MaxSpread = 5.0 // Maximum spread in points (1.0,0.5,10.0)
  • [=== Risk Management ===] MaxDrawdownPercent = 10.0 // Maximum drawdown percentage (5.0,1.0,20.0)
  • [=== Risk Management ===] MaxRiskPerTrade = 2.0 // Maximum risk per trade % (0.5,0.5,5.0)
  • [=== Risk Management ===] MaxOpenTrades = 5 // Maximum open trades (1,1,10)
  • [=== Risk Management ===] StopLossPoints = 50.0 // Stop loss in points (20.0,5.0,150.0)
  • [=== Risk Management ===] TakeProfitPoints = 100.0 // Take profit in points (40.0,10.0,300.0)
  • [=== Dynamic Profit Management ===] EnableDynamicLockProfit = true // Enable dynamic profit locking
  • [=== Dynamic Profit Management ===] LockProfitEvery_X_Points = 30.0 // Step: every X points profit (10.0,5.0,50.0)
  • [=== Dynamic Profit Management ===] LockMinusBuffer = 15.0 // Lock profit minus X point buffer (5.0,2.0,30.0)
  • [=== Dynamic Profit Management ===] EnableDynamicProfitManagementDebug = false // Enable debug logging for dynamic profit management
  • [=== Additional Position Management ===] AllowOnlyProfitableAdditions = true // Only allow adding positions if existing trades are profitable
  • [=== Additional Position Management ===] MinProfitInPointsPerTradeToAdd = 20.0 // Minimum profit required per existing trade in points (10.0,5.0,50.0)
  • [=== Additional Position Management ===] RequireToCheckForConfirmationBeforeAdding = true // Require to check active confirmation before adding new positions
  • [=== Additional Position Management ===] EnableAdditionalPositionManagementDebug = false // Enable debug logging for additional position management
  • [=== Adaptive Indicators ===] EnableIndicatorDebug = false // Enable debug logging for indicators
  • [=== Adaptive Indicators ===] UseAMAforEntrySignals = true // Use AMA for entry signals
  • [=== Adaptive Indicators ===] UseAMAforConfirmation = true // Use AMA for confirmation
  • [=== Adaptive Indicators ===] UseRSIforEntrySignals = true // Use RSI for entry signals
  • [=== Adaptive Indicators ===] UseRSIforConfirmation = true // Use RSI for confirmation
  • [=== Adaptive Indicators ===] AdaptiveMA_Period = 14 // Adaptive MA base period (8,2,30)
  • [=== Adaptive Indicators ===] AdaptiveMA_Sensitivity = 2.0 // Adaptive sensitivity multiplier (1.0,0.5,5.0)
  • [=== RSI Settings ===] RSI_Period = 14 // RSI period (7,1,21)
  • [=== RSI Settings ===] RSI_Oversold = 30.0 // RSI oversold level (20.0,1.0,40.0)
  • [=== RSI Settings ===] RSI_Overbought = 70.0 // RSI overbought level (60.0,1.0,80.0)
  • [=== RSI Settings ===] RSI_UseCrossoverSignals = true // Use RSI crossover signals
  • [=== RSI Settings ===] RSI_UseDivergenceSignals = false // Use RSI divergence signals
  • [=== RSI Settings ===] EnableRSI_Debug = false // Enable RSI debug logging
  • [=== ATR Settings ===] ATR_Period = 14 // ATR period (7,1,28)
  • [=== ATR Settings ===] UseATRforVolatilityFilter = true // Use ATR for volatility filtering
  • [=== ATR Settings ===] ATR_VolatilityMultiplier = 1.0 // ATR volatility multiplier (0.5,0.1,3.0)
  • [=== ATR Settings ===] EnableATR_Debug = false // Enable ATR debug logging
  • [=== Bollinger Bands Settings ===] BB_Period = 20 // Bollinger Bands period (10,5,50)
  • [=== Bollinger Bands Settings ===] BB_Deviation = 2.0 // Standard deviation multiplier (1.0,0.1,3.0)
  • [=== Bollinger Bands Settings ===] UseBBforEntrySignals = true // Use Bollinger Bands for entry signals
  • [=== Bollinger Bands Settings ===] UseBBforConfirmation = true // Use Bollinger Bands for confirmation
  • [=== Bollinger Bands Settings ===] BB_UseBreakoutStrategy = true // Use breakout strategy
  • [=== Bollinger Bands Settings ===] BB_UseMeanReversionStrategy = false // Use mean reversion strategy
  • [=== Bollinger Bands Settings ===] EnableBB_Debug = false // Enable Bollinger Bands debug logging
  • [=== Additional Indicators ===] UseHeikenAshi = true // Use Heiken Ashi for smoother signals
  • [=== Additional Indicators ===] UseVolatilityFilter = true // Use volatility filter for entries
  • [=== Additional Indicators ===] VolatilityThreshold = 0.3 // Minimum volatility threshold in points (0.1,0.1,1.0)
  • [=== Session Filter ===] UseSessionFilter = false // Use trading session filter
  • [=== Session Filter ===] TradeLondonSession = true // Trade during London session (8-16 GMT)
  • [=== Session Filter ===] TradeNewYorkSession = true // Trade during New York session (13-21 GMT)
  • [=== Session Filter ===] TradeOverlapSession = true // Trade during London/NY overlap (13-16 GMT)
Pseudocode
// Pipsgrowth EX12038 MultiIndicatorConfluence — Execution Flow (from source analysis)
// Family: MultiIndicatorConfluence
// Adaptive forex scalping EA combining AMA, RSI, ATR, Bollinger Bands and Heiken Ashi confluence. Supports BB breakout and mean-reversion modes, dynamic profit locking, additional position management, session and volatility filters. 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:
EURUSD
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
EnableTradingtrueEnable trading
EnableDebugfalseEnable debug logging
AllowBuystrueAllow opening buy orders
AllowSellstrueAllow opening sell orders
LotSize1.0Fixed lot size (0.01,0.01,2.0)
MagicNumber22212038Magic number
InpTradeComment"Psgrowth.com Expert_12038"Trade comment
Slippage3Slippage in points (1,1,10)
MaxSpread5.0Maximum spread in points (1.0,0.5,10.0)
MaxDrawdownPercent10.0Maximum drawdown percentage (5.0,1.0,20.0)
MaxRiskPerTrade2.0Maximum risk per trade % (0.5,0.5,5.0)
MaxOpenTrades5Maximum open trades (1,1,10)
StopLossPoints50.0Stop loss in points (20.0,5.0,150.0)
TakeProfitPoints100.0Take profit in points (40.0,10.0,300.0)
EnableDynamicLockProfittrueEnable dynamic profit locking
LockProfitEvery_X_Points30.0Step: every X points profit (10.0,5.0,50.0)
LockMinusBuffer15.0Lock profit minus X point buffer (5.0,2.0,30.0)
EnableDynamicProfitManagementDebugfalseEnable debug logging for dynamic profit management
AllowOnlyProfitableAdditionstrueOnly allow adding positions if existing trades are profitable
MinProfitInPointsPerTradeToAdd20.0Minimum profit required per existing trade in points (10.0,5.0,50.0)
RequireToCheckForConfirmationBeforeAddingtrueRequire to check active confirmation before adding new positions
EnableAdditionalPositionManagementDebugfalseEnable debug logging for additional position management
EnableIndicatorDebugfalseEnable debug logging for indicators
UseAMAforEntrySignalstrueUse AMA for entry signals
UseAMAforConfirmationtrueUse AMA for confirmation
UseRSIforEntrySignalstrueUse RSI for entry signals
UseRSIforConfirmationtrueUse RSI for confirmation
AdaptiveMA_Period14Adaptive MA base period (8,2,30)
AdaptiveMA_Sensitivity2.0Adaptive sensitivity multiplier (1.0,0.5,5.0)
RSI_Period14RSI period (7,1,21)
RSI_Oversold30.0RSI oversold level (20.0,1.0,40.0)
RSI_Overbought70.0RSI overbought level (60.0,1.0,80.0)
RSI_UseCrossoverSignalstrueUse RSI crossover signals
RSI_UseDivergenceSignalsfalseUse RSI divergence signals
EnableRSI_DebugfalseEnable RSI debug logging
ATR_Period14ATR period (7,1,28)
UseATRforVolatilityFiltertrueUse ATR for volatility filtering
ATR_VolatilityMultiplier1.0ATR volatility multiplier (0.5,0.1,3.0)
EnableATR_DebugfalseEnable ATR debug logging
BB_Period20Bollinger Bands period (10,5,50)
BB_Deviation2.0Standard deviation multiplier (1.0,0.1,3.0)
UseBBforEntrySignalstrueUse Bollinger Bands for entry signals
UseBBforConfirmationtrueUse Bollinger Bands for confirmation
BB_UseBreakoutStrategytrueUse breakout strategy
BB_UseMeanReversionStrategyfalseUse mean reversion strategy
EnableBB_DebugfalseEnable Bollinger Bands debug logging
UseHeikenAshitrueUse Heiken Ashi for smoother signals
UseVolatilityFiltertrueUse volatility filter for entries
VolatilityThreshold0.3Minimum volatility threshold in points (0.1,0.1,1.0)
UseSessionFilterfalseUse trading session filter
TradeLondonSessiontrueTrade during London session (8-16 GMT)
TradeNewYorkSessiontrueTrade during New York session (13-21 GMT)
TradeOverlapSessiontrueTrade during London/NY overlap (13-16 GMT)
Source Code (.mq5)Open Source
Pipsgrowth_com_EX12038.mq5
#property copyright "Pipsgrowth.com"
#property link      "https://pipsgrowth.com"
#property version   "2.00"
#property strict
#property description "Pipsgrowth.com EX12038 EURUSD_1_3_1 — Adaptive AMA+RSI+ATR+BB+Heiken Ashi scalper, full 12-layer stack."

#include <Trade/Trade.mqh>
#include <Trade/PositionInfo.mqh>
#include <Trade/AccountInfo.mqh>

//--- Global objects
CTrade         trade;
CPositionInfo  position;
CAccountInfo   account;

//--- Input parameters
input group "=== Basic Settings ==="
input bool     EnableTrading = true;                    // Enable trading
input bool     EnableDebug = false;                     // Enable debug logging
input bool     AllowBuys = true;                        // Allow opening buy orders
input bool     AllowSells = true;                       // Allow opening sell orders
input double   LotSize = 1.0;                           // Fixed lot size (0.01,0.01,2.0)
input int      MagicNumber = 22212038;                  // Magic number
input string   InpTradeComment = "Psgrowth.com Expert_12038"; // Trade comment
input int      Slippage = 3;                            // Slippage in points (1,1,10)

input group "=== Risk Management ==="
input double   MaxSpread = 5.0;                         // Maximum spread in points (1.0,0.5,10.0)
input double   MaxDrawdownPercent = 10.0;               // Maximum drawdown percentage (5.0,1.0,20.0)
input double   MaxRiskPerTrade = 2.0;                   // Maximum risk per trade % (0.5,0.5,5.0)
input int      MaxOpenTrades = 5;                       // Maximum open trades (1,1,10)
input double   StopLossPoints = 50.0;                   // Stop loss in points (20.0,5.0,150.0)
input double   TakeProfitPoints = 100.0;                // Take profit in points (40.0,10.0,300.0)

input group "=== Dynamic Profit Management ==="
input bool     EnableDynamicLockProfit = true;         // Enable dynamic profit locking
input double   LockProfitEvery_X_Points = 30.0;        // Step: every X points profit (10.0,5.0,50.0)
input double   LockMinusBuffer = 15.0;                 // Lock profit minus X point buffer (5.0,2.0,30.0)
input bool     EnableDynamicProfitManagementDebug = false; // Enable debug logging for dynamic profit management

input group "=== Additional Position Management ==="
input bool     AllowOnlyProfitableAdditions = true;    // Only allow adding positions if existing trades are profitable
input double   MinProfitInPointsPerTradeToAdd = 20.0;  // Minimum profit required per existing trade in points (10.0,5.0,50.0)
input bool     RequireToCheckForConfirmationBeforeAdding = true; // Require to check active confirmation before adding new positions
input bool     EnableAdditionalPositionManagementDebug = false; // Enable debug logging for additional position management

input group "=== Adaptive Indicators ==="
input bool     EnableIndicatorDebug = false;            // Enable debug logging for indicators
input bool     UseAMAforEntrySignals = true;            // Use AMA for entry signals
input bool     UseAMAforConfirmation = true;            // Use AMA for confirmation
input bool     UseRSIforEntrySignals = true;            // Use RSI for entry signals
input bool     UseRSIforConfirmation = true;            // Use RSI for confirmation
input int      AdaptiveMA_Period = 14;                 // Adaptive MA base period (8,2,30)
input double   AdaptiveMA_Sensitivity = 2.0;           // Adaptive sensitivity multiplier (1.0,0.5,5.0)

input group "=== RSI Settings ==="
input int      RSI_Period = 14;                        // RSI period (7,1,21)
input double   RSI_Oversold = 30.0;                    // RSI oversold level (20.0,1.0,40.0)
input double   RSI_Overbought = 70.0;                  // RSI overbought level (60.0,1.0,80.0)
input bool     RSI_UseCrossoverSignals = true;         // Use RSI crossover signals

Full source code available on download

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

Tags:ex12038multiindicatorconfluencepipsgrowthfreemt5eurusd

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_EX12038.mq5
File Size68.1 KB
Versionv2.00
PlatformMetaTrader 5
File Type.mq5 Source
StrategyOther
Risk LevelMedium Risk
Timeframes
M5H1
Currency Pairs
EURUSD
Min. Deposit$100