P
PipsGrowth
OtherOpen Source – Free

Pipsgrowth EX01010 Adaptive

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

Pipsgrowth.com EX01010 USDJPY GPU Adaptive EA — GPU-accelerated multi-indicator adaptive EA, full 12-layer stack, configurable timeframe, filling mode detection, retry logic, configurable BE/profit-lock, pyramid gate, spread filter, new-bar gate.

Overview

Pipsgrowth EX01010 Adaptive is a USDJPY-only Expert Advisor built around four adaptive moving averages (KAMA, FRAMA, VIDYA, ZLEMA) fused with an adaptive-period RSI and a session-momentum oscillator, all scored on a weighted confirmation grid before any order is sent. The original build carries an OpenCL GPU manager that compiles five custom kernels — usdjpy_calculate_KAMA, usdjpy_calculate_FRAMA, usdjpy_calculate_VIDYA, usdjpy_calculate_ZLEMA, and usdjpy_calculate_AdaptiveRSI — each tuned with USDJPY-specific multipliers (volatility 1.15, range 0.85, momentum 1.25, lag 1.10). On a machine without OpenCL the kernels fall back to a CPU path inside CalculateUSdjpyGPUIndicators() that approximates the same outputs as simple moving averages of different lengths (KAMA=10, FRAMA=16, VIDYA=14, ZLEMA=8) so the EA remains identical in behavior on any MT5 install.

The signal layer is the most opinionated part of the code. GenerateUSdjpySignalConfirmations() runs on every closed bar of the active timeframe and scores six independent sources: KAMA above/below price, FRAMA above/below price, VIDYA above/below price, ZLEMA above/below price, RSI oversold (<25) or overbought (>75), and session momentum positive or negative. Each source carries an input-controlled weight — USDJPY_KAMA_Weight=1.5, USDJPY_FRAMA_Weight=1.3, USDJPY_VIDYA_Weight=1.2, USDJPY_ZLEMA_Weight=1.0, USDJPY_RSI_Weight=0.8, USDJPY_Session_Weight=1.1 — multiplied by a session boost that ranges from 0.85 in quiet hours to 1.35 in overlap hours. Four boolean confirmation gates then stack on top: trend_confirmation (efficiency ratio > 0.6), momentum_confirmation (|CMO| > 0.3), volatility_confirmation (fractal dimension 1.21.8), and session_confirmation (active high-volatility session). Each gate multiplies the running signal strength by 1.051.15. ExecuteUSdjpyTradingLogic() only fires when bullish or bearish confirmations meet the USDJPY_MinConfirmations=3 floor, when MaxOpenPositions=2 is not already filled, and when at least 5 minutes have passed since the last order.

Lot sizing is composite. CalculateUSdjpyLotSize() starts from FixedLotSize=0.01, then applies a volatility adjustment (fractal dimension above 1.5 reduces by 1/USDJPY_VolatilityLotAdjust=1.2; below 1.3 increases by 1.2), then a session adjustment (×1.2 in overlap hours, ×0.8 in quiet hours), then NormalizeLot() clamps to the broker volume step and to InpMaxLot=100. Stops and targets are ATR-driven when USDJPY_UseATRStops is true: CalculateUSdjpyStopLoss() reads iATR(21), multiplies by USDJPY_ATRMultiplierSL=1.8, then by fractal_dimension/1.5 to widen in high-vol regimes; CalculateUSdjpyTakeProfit() does the same with USDJPY_ATRMultiplierTP=2.5 and a 1.3× extension when efficiency_ratio > 0.7. The fixed-pip fallback uses USDJPY_StopLossPips=30 and USDJPY_TakeProfitPips=60.

Position management is split between ManageUSdjpyPositions() (every tick) and the pyramid gate. The break-even trigger fires once profit exceeds BreakEvenTriggerPips=20 and moves the stop to entry plus 2 pips. The profit-lock ladder ratchets every ProfitLockIncrementPips=10 and trails ProfitLockStepPips=3 behind the running lock level. The pyramid gate (InpPyramidGateMode=1 default) refuses to add a second position if the existing one has not earned at least InpProfitGatePips=5.

The safety stack runs through IsSafeToTrade() at the top of every tick. The EA refuses to trade when the capital cap is reached, when equity falls below the cap floor (InpCapFloor=100) or below MinEquityPercent=80% of the initial balance, when realized daily loss exceeds MaxDailyLossPercent=3%, when realized weekly loss exceeds InpMaxWeeklyLossPct=8%, after InpMaxConsecLosses=3 consecutive losses until InpCooldownMin=30 minutes have elapsed, after MaxTradesPerDay=10 orders, when the market is closed (Friday 22:00–Sunday 22:00 GMT), during the quiet session if USDJPY_SessionFilter is on, and during JPY news windows via IsNewsTime() which blocks ±USDJPY_NewsAvoidMinutes=30 minutes around Tokyo (00:00 GMT), London (08:00 GMT), and New York (13:00 GMT) opens. The terminal kill switch InpMaxDDPct=20% halts trading permanently once the drawdown from initial balance crosses the threshold, and OnTester() returns 0 in the same condition to prevent the strategy tester from selecting over-fit parameter sets. ShowGPUPerformance=true logs total calculations, average milliseconds, and failure counts every GPUPerformanceFreq=50 signals, and InpDryRun=true logs signals without sending orders for validation runs. Magic 22201010 isolates the EA on the account and the trade comment Psgrowth.com Expert_01010 identifies entries on the broker statement.

Configuration is heavy: 56 input parameters across ten groups (USDJPY EA Settings, USDJPY Trading Settings, USDJPY Position Sizing, USDJPY Trade Management, USDJPY Risk Management, USDJPY Signal Confirmations, USDJPY Advanced Settings, GPU Performance, Risk Management, Capital Cap, Sessions Management, Safety Caps). The timeframes accepted by MapTimeframe() are M1, M3, M5, M10, M15, M30, H1, H4, D1 — although the source header recommends M5 for primary use and validates up to H1. The min-deposit entry on the listing is $100, sized to FixedLotSize=0.01; serious deployments should respect the InpCapFloor=100 literal so the equity-protection trip does not fire on day one.

For backtests: the OnTester() function weights profit × profit factor (capped at 10) × 1/(1+DD/10), so optimization in MT5 will tend to select lower-DD, higher-quality-of-fill parameter sets. Anything with a drawdown above 20% or fewer than 20 trades is rejected outright by the custom criterion. Plan optimizer passes with conservative risk (0.5% per trade) and walk-forward on at least two years of USDJPY tick data before any live run. Brokers that support ECN or ECN-Pro execution with sub-2-pip average USDJPY spreads, micro-lot volume steps (0.01), and ORDER_FILLING_FOK or ORDER_FILLING_IOC filling modes (which DetectFillingMode() auto-selects) will let the EA run at its designed cadence; market-execution accounts with requotes will trigger the retry loop in ExecuteUSdjpyBuyTrade() and ExecuteUSdjpySellTrade() more often, so VPS hosting within 30ms of the broker server is recommended for any account larger than the $100 minimum.

Strategy Deep Dive

On every closed bar of the active timeframe, GetUSdjpyMarketData() pulls 120 bars of OHLC plus per-bar session flags, then CalculateUSdjpyGPUIndicators() runs five adaptive kernels (or their CPU approximations) to produce KAMA, FRAMA, VIDYA, ZLEMA, adaptive-RSI, session-momentum, efficiency-ratio, fractal-dimension, and CMO. GenerateUSdjpySignalConfirmations() scores six directional sources with per-source weights and a session boost, then layers four boolean confirmation gates. ExecuteUSdjpyTradingLogic() fires a long or short only when the directional confirmations meet USDJPY_MinConfirmations=3, when MaxOpenPositions=2 is not full, and when at least 5 minutes have elapsed since the last order. CalculateUSdjpyLotSize() composes fixed-lot × volatility-adjust × session-boost, CalculateUSdjpyStopLoss() and CalculateUSdjpyTakeProfit() derive ATR(21)-multiplied levels scaled by fractal dimension. ManageUSdjpyPositions() runs every tick to ratchet the stop to break-even plus 2 pips after 20 pips of profit, then climb the profit-lock ladder every 10 pips. IsSafeToTrade() blocks every tick that breaches the cap, floor, daily/weekly loss, cooldown, day-trade limit, weekend window, JPY news window, or 20% drawdown kill switch.

Entry Signal

Entries fire when at least 3 of 6 weighted confirmation sources agree on direction: KAMA, FRAMA, VIDYA, ZLEMA position relative to price, adaptive-RSI oversold/overbought (25/75), and session momentum — each multiplied by its input weight and the current session boost (0.851.35). The four boolean gates (trend efficiency > 0.6, |CMO| > 0.3, fractal dimension 1.21.8, active high-volatility session) further amplify the score, and ExecuteUSdjpyTradingLogic rejects any signal below MinConfirmations or above MaxOpenPositions=2.

Exit Signal

Exits are passive: positions close at the ATR-multiplied TP (2.5x ATR by default, extended 1.3x in trends where efficiency ratio > 0.7), at the fixed TP of 60 pips when ATR stops are off, or when the stop is hit. In-trade management ratchets the stop to break-even plus 2 pips after 20 pips of profit, then to a profit-lock level that climbs every 10 pips and trails 3 pips behind. The pyramid gate prevents adding to a position until it has earned at least 5 pips.

Stop Loss

Stop loss defaults to ATR-driven: 1.8x ATR(21) widened or narrowed by the current fractal dimension relative to 1.5. Fixed-pip fallback is 30 pips. The hard kill switch is the 20% total-drawdown trip; daily loss limit 3%, weekly 8%, and 3 consecutive losses trigger a 30-minute cooldown.

Take Profit

Take profit defaults to 2.5x ATR(21), extended 1.3x when the efficiency ratio crosses 0.7 (strong trend). Fixed-pip fallback is 60 pips. Combined with the 1.8x ATR stop, this produces roughly a 1:1.4 risk-to-reward ratio at the default multipliers, widening to 1:1.8 in trending conditions.

Best For

Minimum recommended balance: $100 on a USDJPY micro-lot broker with InpCapFloor respected, scaled larger to support the 1% per-trade risk and the 0.01 fixed base. The 3-pip spread cap, 30-minute JPY news blackout, and 5-minute minimum between trades require a low-latency ECN or ECN-Pro account — typical retail USDJPY spreads above 3 pips will block the majority of signals. The Tokyo 23:00–08:00 GMT, London 08:00–16:00 GMT, and New York 13:00–22:00 GMT sessions all carry their own weighting; London/NY overlap 13:00–16:00 GMT produces the highest signal strength and is where the EA's session boost of 1.35 pays off. Best timeframe is M5 (the source's primary recommendation), with H1 valid for slower accounts; the EA will run on H4 and D1 but signal frequency drops accordingly.

Strategy Logic

Pipsgrowth EX01010 Adaptive — Strategy Logic Analysis (from .mq5 source)

Family: Adaptive Magic: 22201010 Version: 3.00

BRIEF: Production USDJPY EA with GPU-accelerated adaptive indicators (KAMA, FRAMA, VIDYA, ZLEMA) and multi-confirmation signal scoring with session filtering and JPY news avoidance. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

INDICATOR STACK:

  • Standard MT5 indicators

KEY FUNCTIONS:

  • DetectFillingMode()
  • NormalizePrice()
  • ValidateUSdjpyTradingConditions()
  • GetUSdjpyMarketData()
  • CalculateUSdjpyGPUIndicators()
  • GenerateUSdjpySignalConfirmations()
  • ExecuteUSdjpyTradingLogic()
  • ExecuteUSdjpyBuyTrade()
  • ExecuteUSdjpySellTrade()
  • CalculateUSdjpyLotSize()
  • CalculateUSdjpyStopLoss()
  • CalculateUSdjpyTakeProfit()
  • ...and 19 more

INTERNAL CONSTANTS (11 total):

  • USDJPY_MAGIC_NUMBER = 202509072300 // Base magic number for USDJPY
  • USDJPY_TYPICAL_SPREAD = 1.5 // Typical USDJPY spread in pips
  • USDJPY_MAX_SAFE_SPREAD = 4.0 // Maximum safe spread in pips
  • USDJPY_POINT_VALUE = 100 // USDJPY point value multiplier
  • USDJPY_MIN_DISTANCE = 20 // Minimum distance for orders in points
  • USDJPY_SESSION_TOKYO_START = 23 // Tokyo session start (GMT)
  • USDJPY_SESSION_TOKYO_END = 8 // Tokyo session end (GMT)
  • USDJPY_SESSION_LONDON_START = 8 // London session start (GMT)
  • USDJPY_SESSION_LONDON_END = 16 // London session end (GMT)
  • USDJPY_SESSION_NY_START = 13 // NY session start (GMT)
  • USDJPY_SESSION_NY_END = 22 // NY session end (GMT)

INPUT PARAMETERS (56 total across 12 groups):

  • [=== USDJPY EA Settings ===] EA_MagicNumber = 22201010 // Magic Number (222xxx)
  • [=== USDJPY EA Settings ===] EA_TradeComment = "Psgrowth.com Expert_01010" // Trade Comment
  • [=== USDJPY EA Settings ===] InpTimeframe = 3 // Timeframe: 1=M1,2=M3,3=M5,4=M10,5=M15,6=M30,7=H1,8=H4,9=D1
  • [=== USDJPY EA Settings ===] EnableGPUAcceleration = true // Enable GPU Acceleration
  • [=== USDJPY EA Settings ===] USDJPY_OptimizeForNews = true // Optimize for JPY News Events
  • [=== USDJPY Trading Settings ===] AllowLongTrades = true // Allow Long Trades
  • [=== USDJPY Trading Settings ===] AllowShortTrades = true // Allow Short Trades
  • [=== USDJPY Trading Settings ===] MaxOpenPositions = 2 // Maximum Open Positions (USDJPY optimized)
  • [=== USDJPY Trading Settings ===] USDJPY_MinPipDistance = 20.0 // Minimum Pip Distance Between Trades
  • [=== USDJPY Trading Settings ===] USDJPY_SessionFilter = true // Enable USDJPY Session Filtering
  • [=== USDJPY Position Sizing ===] FixedLotSize = 0.01 // Fixed Lot Size
  • [=== USDJPY Position Sizing ===] USDJPY_RiskPerTrade = 1.0 // Risk Per Trade (% of equity)
  • [=== USDJPY Position Sizing ===] USDJPY_MaxRiskPerDay = 5.0 // Maximum Risk Per Day (% of equity)
  • [=== USDJPY Position Sizing ===] USDJPY_VolatilityLotAdjust = 1.2 // Volatility-Based Lot Adjustment
  • [=== USDJPY Trade Management ===] InpEnableBreakEven = true // Enable break-even move
  • [=== USDJPY Trade Management ===] BreakEvenTriggerPips = 20.0 // Break-even trigger in pips
  • [=== USDJPY Trade Management ===] InpEnableProfitLock = true // Enable profit lock
  • [=== USDJPY Trade Management ===] ProfitLockIncrementPips = 10.0 // Profit lock increment in pips
  • [=== USDJPY Trade Management ===] ProfitLockStepPips = 3.0 // Profit lock step in pips
  • [=== USDJPY Trade Management ===] InpPyramidGateMode = 1 // Pyramid gate: 0=off, 1=profit only, 2=profit+SL
  • [=== USDJPY Trade Management ===] InpProfitGatePips = 5.0 // Min profit in pips for pyramid gate
  • [=== USDJPY Risk Management ===] USDJPY_StopLossPips = 30.0 // Stop Loss in Pips
  • [=== USDJPY Risk Management ===] USDJPY_TakeProfitPips = 60.0 // Take Profit in Pips
  • [=== USDJPY Risk Management ===] USDJPY_UseATRStops = true // Use ATR-Based Stops
  • [=== USDJPY Risk Management ===] USDJPY_ATRMultiplierSL = 1.8 // ATR Multiplier for SL (USDJPY optimized)
  • [=== USDJPY Risk Management ===] USDJPY_ATRMultiplierTP = 2.5 // ATR Multiplier for TP (USDJPY optimized)
  • [=== USDJPY Risk Management ===] USDJPY_ATRPeriod = 21 // ATR Period (USDJPY optimized)
  • [=== USDJPY Signal Confirmations ===] USDJPY_MinConfirmations = 3 // Minimum Confirmations Required
  • [=== USDJPY Signal Confirmations ===] USDJPY_KAMA_Weight = 1.5 // KAMA Signal Weight
  • [=== USDJPY Signal Confirmations ===] USDJPY_FRAMA_Weight = 1.3 // FRAMA Signal Weight
  • [=== USDJPY Signal Confirmations ===] USDJPY_VIDYA_Weight = 1.2 // VIDYA Signal Weight
  • [=== USDJPY Signal Confirmations ===] USDJPY_ZLEMA_Weight = 1.0 // ZLEMA Signal Weight
  • [=== USDJPY Signal Confirmations ===] USDJPY_RSI_Weight = 0.8 // Adaptive RSI Weight
  • [=== USDJPY Signal Confirmations ===] USDJPY_Session_Weight = 1.1 // Session Momentum Weight
  • [=== USDJPY Advanced Settings ===] USDJPY_VolatilityThreshold = 0.8 // Volatility Threshold (pips)
  • [=== USDJPY Advanced Settings ===] USDJPY_TrendStrengthMin = 0.6 // Minimum Trend Strength
  • [=== USDJPY Advanced Settings ===] USDJPY_AvoidJPYNews = true // Avoid Trading During JPY News
  • [=== USDJPY Advanced Settings ===] USDJPY_NewsAvoidMinutes = 30 // Minutes to Avoid Around News
  • [=== USDJPY Advanced Settings ===] USDJPY_MaxSpreadPips = 3.0 // Maximum Spread in Pips
  • [=== USDJPY Advanced Settings ===] USDJPY_UseSessionBoost = true // Use Session-Based Signal Boosting
  • [=== GPU Performance ===] ShowGPUPerformance = true // Show GPU Performance Stats
  • [=== GPU Performance ===] GPUPerformanceFreq = 50 // GPU Performance Report Frequency
  • [=== GPU Performance ===] GPURetryAttempts = 3 // GPU Calculation Retry Attempts
  • [=== Risk Management ===] MaxDailyLossPercent = 3.0 // Maximum daily loss percentage
  • [=== Risk Management ===] MaxTradesPerDay = 10 // Maximum trades per day
  • [=== Risk Management ===] MinEquityPercent = 80.0 // Stop trading if equity falls below this % of initial balance
  • [=== Risk Management ===] InpMaxConsecLosses = 3 // Max consecutive losses before cooldown (0=disabled)
  • [=== Risk Management ===] InpCooldownMin = 30 // Cooldown minutes after consec losses (0=disabled)
  • [=== Risk Management ===] InpMaxWeeklyLossPct = 8.0 // Max weekly loss % (0=disabled)
  • [=== Capital Cap ===] InpCapAmount = 0.0 // Capital cap amount (stop trading at this equity)
  • [=== Capital Cap ===] InpCapFloor = 100.0 // Capital floor (stop trading below this equity)
  • [=== Sessions Management (GMT) ===] InpServerGMTOffset = 0 // Server GMT offset in hours (0=auto-detect via weekend gap)
  • [=== Safety Caps ===] InpMaxDDPct = 20.0 // Max total drawdown % (0=disabled, triggers kill switch)
  • [=== Safety Caps ===] InpKillSwitch = false // Kill switch (stops all trading immediately)
  • [=== Safety Caps ===] InpDryRun = false // Dry-run mode: log signals without trading
  • [=== Safety Caps ===] InpMaxLot = 100.0 // Maximum lot size cap
Pseudocode
// Pipsgrowth EX01010 Adaptive — Execution Flow (from source analysis)
// Family: Adaptive
// Production USDJPY EA with GPU-accelerated adaptive indicators (KAMA, FRAMA, VIDYA, ZLEMA) and multi-confirmation signal scoring with session filtering and JPY news avoidance. 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:
USDJPY
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
EA_MagicNumber22201010Magic Number (222xxx)
EA_TradeComment"Psgrowth.com Expert_01010"Trade Comment
InpTimeframe3Timeframe: 1=M1,2=M3,3=M5,4=M10,5=M15,6=M30,7=H1,8=H4,9=D1
EnableGPUAccelerationtrueEnable GPU Acceleration
USDJPY_OptimizeForNewstrueOptimize for JPY News Events
AllowLongTradestrueAllow Long Trades
AllowShortTradestrueAllow Short Trades
MaxOpenPositions2Maximum Open Positions (USDJPY optimized)
USDJPY_MinPipDistance20.0Minimum Pip Distance Between Trades
USDJPY_SessionFiltertrueEnable USDJPY Session Filtering
FixedLotSize0.01Fixed Lot Size
USDJPY_RiskPerTrade1.0Risk Per Trade (% of equity)
USDJPY_MaxRiskPerDay5.0Maximum Risk Per Day (% of equity)
USDJPY_VolatilityLotAdjust1.2Volatility-Based Lot Adjustment
InpEnableBreakEventrueEnable break-even move
BreakEvenTriggerPips20.0Break-even trigger in pips
InpEnableProfitLocktrueEnable profit lock
ProfitLockIncrementPips10.0Profit lock increment in pips
ProfitLockStepPips3.0Profit lock step in pips
InpPyramidGateMode1Pyramid gate: 0=off, 1=profit only, 2=profit+SL
InpProfitGatePips5.0Min profit in pips for pyramid gate
USDJPY_StopLossPips30.0Stop Loss in Pips
USDJPY_TakeProfitPips60.0Take Profit in Pips
USDJPY_UseATRStopstrueUse ATR-Based Stops
USDJPY_ATRMultiplierSL1.8ATR Multiplier for SL (USDJPY optimized)
USDJPY_ATRMultiplierTP2.5ATR Multiplier for TP (USDJPY optimized)
USDJPY_ATRPeriod21ATR Period (USDJPY optimized)
USDJPY_MinConfirmations3Minimum Confirmations Required
USDJPY_KAMA_Weight1.5KAMA Signal Weight
USDJPY_FRAMA_Weight1.3FRAMA Signal Weight
USDJPY_VIDYA_Weight1.2VIDYA Signal Weight
USDJPY_ZLEMA_Weight1.0ZLEMA Signal Weight
USDJPY_RSI_Weight0.8Adaptive RSI Weight
USDJPY_Session_Weight1.1Session Momentum Weight
USDJPY_VolatilityThreshold0.8Volatility Threshold (pips)
USDJPY_TrendStrengthMin0.6Minimum Trend Strength
USDJPY_AvoidJPYNewstrueAvoid Trading During JPY News
USDJPY_NewsAvoidMinutes30Minutes to Avoid Around News
USDJPY_MaxSpreadPips3.0Maximum Spread in Pips
USDJPY_UseSessionBoosttrueUse Session-Based Signal Boosting
ShowGPUPerformancetrueShow GPU Performance Stats
GPUPerformanceFreq50GPU Performance Report Frequency
GPURetryAttempts3GPU Calculation Retry Attempts
MaxDailyLossPercent3.0Maximum daily loss percentage
MaxTradesPerDay10Maximum trades per day
MinEquityPercent80.0Stop trading if equity falls below this % of initial balance
InpMaxConsecLosses3Max consecutive losses before cooldown (0=disabled)
InpCooldownMin30Cooldown minutes after consec losses (0=disabled)
InpMaxWeeklyLossPct8.0Max weekly loss % (0=disabled)
InpCapAmount0.0Capital cap amount (stop trading at this equity)
InpCapFloor100.0Capital floor (stop trading below this equity)
InpServerGMTOffset0Server GMT offset in hours (0=auto-detect via weekend gap)
InpMaxDDPct20.0Max total drawdown % (0=disabled, triggers kill switch)
InpKillSwitchfalseKill switch (stops all trading immediately)
InpDryRunfalseDry-run mode: log signals without trading
InpMaxLot100.0Maximum lot size cap
Source Code (.mq5)Open Source
Pipsgrowth_com_EX01010.mq5
#property copyright "Pipsgrowth.com"
#property link      "https://pipsgrowth.com"
#property version   "3.00"
#property strict
#property description "Pipsgrowth.com EX01010 USDJPY GPU Adaptive EA — GPU-accelerated multi-indicator adaptive EA, full 12-layer stack, configurable timeframe, filling mode detection, retry logic, configurable BE/profit-lock, pyramid gate, spread filter, new-bar gate."

#include <Trade\Trade.mqh>

CTrade trade;

//--- Hardening globals
ENUM_TIMEFRAMES g_timeframe = PERIOD_M5;
datetime       g_lastSignalBarTime = 0;
ENUM_ORDER_TYPE_FILLING g_fillingMode;

ENUM_TIMEFRAMES MapTimeframe(int tf)
{
   switch(tf)
   {
      case 1: return PERIOD_M1;
      case 2: return PERIOD_M3;
      case 3: return PERIOD_M5;
      case 4: return PERIOD_M10;
      case 5: return PERIOD_M15;
      case 6: return PERIOD_M30;
      case 7: return PERIOD_H1;
      case 8: return PERIOD_H4;
      case 9: return PERIOD_D1;
      default: return PERIOD_M5;
   }
}

bool DetectFillingMode()
{
   int filling = (int)SymbolInfoInteger(_Symbol, SYMBOL_FILLING_MODE);
   if((filling & SYMBOL_FILLING_FOK) != 0)
      g_fillingMode = ORDER_FILLING_FOK;
   else if((filling & SYMBOL_FILLING_IOC) != 0)
      g_fillingMode = ORDER_FILLING_IOC;
   else
      g_fillingMode = ORDER_FILLING_RETURN;
   return true;
}

double NormalizePrice(double price)
{
   double tickSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE);
   if(tickSize <= 0) return price;
   return MathRound(price / tickSize) * tickSize;
}

//+------------------------------------------------------------------+
//| USDJPY-Specific Constants                                       |
//+------------------------------------------------------------------+
#define USDJPY_MAGIC_NUMBER       202509072300      // Base magic number for USDJPY
#define USDJPY_TYPICAL_SPREAD     1.5               // Typical USDJPY spread in pips
#define USDJPY_MAX_SAFE_SPREAD    4.0               // Maximum safe spread in pips
#define USDJPY_POINT_VALUE        100               // USDJPY point value multiplier
#define USDJPY_MIN_DISTANCE       20                // Minimum distance for orders in points
#define USDJPY_SESSION_TOKYO_START     23           // Tokyo session start (GMT)

Full source code available on download

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

Tags:ex01010adaptivepipsgrowthfreemt5usdjpy

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_EX01010.mq5
File Size91.5 KB
Versionv3.00
PlatformMetaTrader 5
File Type.mq5 Source
StrategyOther
Risk LevelMedium Risk
Timeframes
M5H1
Currency Pairs
USDJPY
Min. Deposit$100