P
PipsGrowth
Mean ReversionOpen Source – Free

Pipsgrowth EX09009 MeanReversion

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

Pipsgrowth.com EX09009 HangingManHammer Stoch — candlestick reversal + Stochastic confirm, full 12-layer stack.

Overview

Pipsgrowth EX09009 MeanReversion hunts for a specific geometric candle — the Hammer (bullish reversal) or the Hanging Man (bearish reversal) — and then asks the Stochastic oscillator to confirm the move before any order leaves the broker. Everything else in the EA exists to filter out trades that don't match the original idea: a 7-state market regime classifier, an H1 higher-timeframe trend filter, a 5-bar cooldown after a loss, daily and weekly drawdown caps, a 60-bar time stop, a server-time session gate, and a hard floor on the absolute account equity. The strategy is the same mean-reversion thesis used across the rest of the EX09 family — fade exhaustion moves at the end of a swing — but the confirmation oscillator here is Stochastic instead of the CCI used in EX09006, which makes the EA more sensitive to momentum exhaustion than to overbought/oversold reading of an unbounded oscillator.

How the candle is identified

SignalPattern() reads four price points from the just-closed M5 bar: iOpen, iClose, iHigh, iLow. It computes the total range, the body size (|open-close|), the upper wick (high minus body top), and the lower wick (body bottom minus low). The bar qualifies as a Hammer or Hanging Man only when two geometric conditions are both true: the body must sit in the upper third of the range (bodyBot > high - range/3.0), and the lower wick must be at least twice the body size AND longer than the upper wick. That combination is the textbook rejection-candle signature — small real body near the high of the bar, with a long lower tail showing that sellers pushed the price down hard but the buyers recovered before the close.

How the trend context is established

A rejection candle by itself is not enough. The bar must also appear on the correct side of a 5-period simple moving average to be a valid signal. If the closed bar's close is below the SMA(5), the EA treats the surrounding context as a short-term downtrend and looks for a Hammer (long signal). If the close is above the SMA(5), the context is an uptrend and the EA looks for a Hanging Man (short signal). The 5-period SMA is held as the indicator handle hMA = iMA(_Symbol, _Period, 5, 0, MODE_SMA, PRICE_CLOSE). This 5-bar window is short enough to react to a recent change of character but long enough to filter the kind of one-bar noise that would otherwise print endless reversals in a flat market.

How the Stochastic confirmation is applied

Once a geometric candle is found on the right side of the SMA(5), the EA checks the Stochastic signal line value at the same closed bar. The default thresholds in the source are InpStochBuyMax = 30 and InpStochSellMin = 70 — these are the input fields, even though the source-file brief mistakenly quotes 20/80. A Hammer is confirmed for a long entry only if the Stochastic signal is below the buy threshold; a Hanging Man is confirmed for a short entry only if the Stochastic signal is above the sell threshold. The Stochastic itself is built with non-standard periods: K=47, D=9, slowing=13 (defined as STOCH_K_DEFAULT, STOCH_D_DEFAULT, STOCH_SLOWING_DEFAULT at the top of the file), which makes the oscillator very slow and very smooth compared to the usual 14/3/3 setting. The slow build means the signal line only prints values outside the 30/70 zone when the market has been trending in one direction long enough to actually exhaust.

A confidence score is logged for every confirmed signal — 50 + (InpStochBuyMax - stoch) * 1.2 for buys, mirrored for sells, capped at 100 — but the score is informational only and does not gate the entry.

How the 7-state regime classifier decides whether the market is tradeable

ClassifyRegime() reads ADX(14), a Bollinger Band width z-score (20-period bands, 2.0 deviations), and an ATR(14) percentile over the last 100 bars. The seven states are STRONG_TREND, WEAK_TREND, RANGE, BREAKOUT, COMPRESS, EXPAND, and CHOPPY. The thresholds are explicit: ADX >= 28 with positive BB-width z-score is BREAKOUT; ADX >= 28 alone is STRONG_TREND; ADX in the 20-28 band is WEAK_TREND; BB-width z-score <= 0.8 is COMPRESS; >= 1.5 is EXPAND; ATR percentile <= 20 is RANGE; >= 80 is BREAKOUT; anything in between is CHOPPY. The EA is a mean-reversion system, so RegimeAllowsEntry() returns true only for RANGE, COMPRESS, and WEAK_TREND. STRONG_TREND, BREAKOUT, EXPAND, and CHOPPY block new entries entirely. A live position that crosses into a blocked regime is force-closed by the REGIME_CHANGE exit reason inside ManageOpenPosition.

How the higher-timeframe trend filter works

ComputeConfirm() calls HTFEMAVal(1), which reads an H1 EMA(50) (defined as hHTFEMA = iMA(_Symbol, PERIOD_H1, 50, 0, MODE_EMA, PRICE_CLOSE)). For a Hammer long signal, the EA wants the M5 close to be below the H1 EMA(50) — the pullback interpretation. For a Hanging Man short signal, the EA wants the M5 close to be above the H1 EMA(50). When InpHTFBarAgree = 1 (the default), this side check must pass or the entry is refused. Setting it to 0 disables the filter.

Sizing, stops, and targets

The stop loss is ATR(14) * 1.8 from the entry, and the take profit is ATR(14) * 3.0. That gives a base reward-to-risk ratio of 1.67:1, which the MIN_RR_RATIO = 1.2 guard in ComputeConfirm enforces as a minimum. Lot size is computed by CalcLotByRisk() from the SL distance, the SYMBOL_TRADE_TICK_VALUE and SYMBOL_TRADE_TICK_SIZE of the broker, and the configured risk percentage — InpRiskPercent = 0.5 of effective capital by default. Effective capital is MathMin(InpCapitalCapAmount, equity) when a cap is configured, or full equity otherwise. The result is then clamped to the broker's volume step, the broker's min/max, and InpMaxLots = 5.0. A portfolio-heat cap of 6% (estimated as CountOurPositions() * riskPct) blocks the new entry if adding the position would push total heat above the cap.

In-trade management

ManageOpenPosition() runs on every tick and applies three independent exit overlays, plus a regime flip. When the position is in profit by 1R (BE_TRIGGER_R = 1.0), the stop is moved to entry plus 2 points and the move is one-shot — it only happens once. When the position is in profit by 1R and the remaining volume is at least 2x the broker minimum, half the position is closed (the 50% partial). An ATR-based trailing stop then tracks at ATR(14) * 2.5 behind the current bid (or in front, for shorts), ratcheting forward in 10-point steps and never loosening. If a valid opposite candle+stochastic pattern forms, the position is closed with reason OPP_SIGNAL. If the bar count since entry exceeds MAX_BARS_IN_TRADE = 60 (five hours on M5), the position is closed with reason TIME_EXIT. If the regime flips into STRONG_TREND, BREAKOUT, or EXPAND, the position is force-closed with reason REGIME_CHANGE.

The 12 layers in this build

The header describes the EA as a 12-layer system: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, and OnTester. The SCALING layer is mostly aspirational in this version — InpMaxConcurrent = 1 and there is no CheckPyramidSafety function — so the EA runs one position per symbol at a time and does not pyramid into winners. The trade execution path (SendOrder) retries once on REQUOTE, PRICE_OFF, PRICE_CHANGED, CONNECTION, and TIMEOUT with a 150ms sleep and a RefreshRates() between attempts. The close and modify paths (TryClose_EX09009, TryClosePartial_EX09009, TryModify_EX09009) each retry three times on the same transient codes, with 200ms sleeps for close and 100ms for modify.

No-trade gate

Before any new order is sent, NoTradeReason() walks a list of guards and returns the first one that fails: kill switch, broker trade disabled, terminal not connected, equity below the InpCapitalCapFloor = 50 floor (or below 50 if no cap), outside the 7:00-20:00 server-time window, weekend, spread above 35 points, inside the ±30-minute news window around each hour boundary, regime disallows entries, daily trade count at 5, still inside the 5-bar post-loss cooldown, or concurrent positions at the limit. The news filter is a time-based proxy that blocks entries near every full hour on the broker clock; it is not connected to a real news feed.

Custom optimization criterion

OnTester() returns (net * profit_factor) / (1.0 + equity_dd_percent) provided the strategy executed at least 30 trades during the test. The formula rewards high net profit and high profit factor while penalizing any non-zero drawdown — it is a quality-weighted ranking that prefers stable returns over lucky blowups.

Dry-run and kill switch

InpDryRun defaults to true, which means the EA logs every intended order to the journal with [DRYRUN] prefix instead of actually sending it. To run live, the user must set this to false. InpKillSwitch defaults to false and acts as a hard stop on all new entries when flipped to true.

What to expect in the backtest

Hammer and Hanging Man candles form a few times per trading day on M5 XAUUSD during the London and New York sessions when swing points are tested. Stochastic with the 47/9/13 build sits in the 30/70 range most of the time and only breaks out during extended directional moves, so signal frequency will be low — usually 1-3 trades per day on XAUUSD M5. Most of those trades should be filtered out by the regime classifier when the market is trending, and the loss-limit and cooldown logic should cap any losing streak. As with all reversal systems, the worst case is a fast market where the rejection candle turns into a continuation bar — the ATR-based stop is wide enough to absorb a normal wick but cannot protect against a gap or a flash event.

Strategy Deep Dive

Every tick the EA first refreshes rates and re-classifies the regime from ADX(14), a Bollinger-band-width z-score (20-period, 2.0 deviation), and an ATR(14) percentile over a 100-bar window into one of seven buckets (STRONG_TREND, WEAK_TREND, RANGE, BREAKOUT, COMPRESS, EXPAND, CHOPPY). When the bar rolls over, SignalPattern() reads the just-closed M5 candle and only returns a Hammer (+1) or Hanging Man (-1) when the body sits in the upper third of the range and the lower wick is at least twice the body size AND longer than the upper wick. A 5-period SMA on the same TF tags the bar as downtrend (Hammer long) or uptrend (Hanging Man short) context; the Stochastic signal line (K=47, D=9, slowing=13) must then sit below 30 (buy) or above 70 (sell) on that same bar to confirm. The H1 EMA(50) read in ComputeConfirm enforces a pullback context (long wants close below H1 EMA50, short wants close above). The 1.67:1 R:R (ATR(14) × 1.8 SL / ATR(14) × 3.0 TP) is checked before the order is sent, lot is sized off 0.5% of effective capital, the no-trade gate filters session / weekend / ±30 min news window / spread / cooldown / equity-floor / daily-trade-count, and SendOrder retries once on REQUOTE/PRICE_OFF/PRICE_CHANGED/CONNECTION/TIMEOUT before giving up.

Entry Signal

A trade opens on a closed M5 bar only when two geometric conditions are both true (small body in the upper third of the range and a lower wick at least twice the body size AND longer than the upper wick — the textbook Hammer or Hanging Man signature), the close sits on the correct side of the 5-period SMA (below for a Hammer long, above for a Hanging Man short), the Stochastic signal line at the same bar is below 30 for a buy or above 70 for a sell, the 7-state regime classifier is in RANGE / COMPRESS / WEAK_TREND, and the H1 EMA(50) side check passes (close below H1 EMA50 for a buy, above for a sell). The duplicate-entry guard then prevents the EA from firing more than once on the same bar.

Exit Signal

The position closes on the first of: 1R break-even one-shot (stop moved to entry+2pt, then honored), 50% partial close at 1R profit (when the remaining lot is at least 2x the broker minimum), the ATR(14) × 2.5 trailing stop ratcheting in 10-point steps forward only, an opposite Hammer/Hanging-Man pattern on the closed bar (only if Stochastic confirms the reverse), the 60-bar M5 time stop, or a regime flip into STRONG_TREND / BREAKOUT / EXPAND that invalidates the mean-reversion thesis. Daily 3% / weekly 6% realized-loss limits also force-close any open position before new entries are considered.

Stop Loss

Stop loss is fixed at ATR(14) × 1.8 from entry, computed from the just-closed M5 bar; this gives a base risk of roughly 0.5% of effective capital on the position because lot size is sized off the same SL distance via tick_value/tick_size. The stop is then moved to entry+2pt once when profit reaches 1R (one-shot break-even), and ratchets forward only via the ATR(14) × 2.5 trail in 10-point steps thereafter.

Take Profit

Take profit is fixed at ATR(14) × 3.0 from entry, a 1.67:1 reward-to-risk ratio against the ATR(14) × 1.8 stop. Half the position is closed at 1R profit (when remaining volume is at least 2x the broker minimum) and the runner rides the ATR-based trail with a 60-bar M5 time stop. A minimum R:R of 1.2 is enforced in ComputeConfirm before any order is sent.

Best For

XAUUSD on the M5 timeframe, where the geometric Hammer / Hanging Man rejection candle forms a few times per session during the London and New York overlap and the 47/9/13 Stochastic has time to push outside the 30/70 zone. Minimum recommended balance is $100 (the 50-dollar equity floor is hard-coded); the dry-run default means the EA ships safe and must be explicitly switched to live mode before it sends orders. Run on a low-spread ECN account — the 35-point spread cap or 3x rolling-average filter is tight enough that wide-spread retail brokers will be filtered out most of the day. Time zone note: the 7:00-20:00 session gate, the daily reset, and the ±30 minute news-window proxy all read the broker server clock, so a GMT+2 or GMT+3 broker aligned with London/NY will see the largest set of qualifying candles.

Strategy Logic

Pipsgrowth EX09009 MeanReversion — Strategy Logic Analysis (from .mq5 source)

Family: MeanReversion Magic: 22209009 Version: 2.00

BRIEF: Hanging Man (bearish) / Hammer (bullish) candlestick on last CLOSED bar + Stochastic confirmation (Stoch<20 Buy / Stoch>80 Sell). 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

INDICATOR STACK:

  • Standard MT5 indicators

KEY FUNCTIONS:

  • Norm()
  • ClampVolume()
  • PointsToPrice()
  • StopsLevelPrice()
  • CopyBuf()
  • StochSignalVal()
  • MAVal()
  • ATRVal()
  • ADXVal()
  • HTFEMAVal()
  • GetBBWidthZ()
  • GetATRPctile()
  • ...and 28 more

INTERNAL CONSTANTS (36 total):

  • ATR_REG_PERIOD = 14 // ATR period for regime
  • ATR_PCTILE_LOOKBACK = 100 // ATR percentile window
  • BB_REG_PERIOD = 20 // Bollinger Band period (regime)
  • BB_REG_DEV = 2.0 // Bollinger Band deviation
  • ADX_REG_PERIOD = 14 // ADX period (regime)
  • HTF_TREND_PERIOD = 50 // HTF EMA period
  • HTF_TIMEFRAME = PERIOD_H1 // HTF timeframe for trend agreement
  • MA_TREND_PERIOD = 5 // short SMA for pattern trend context
  • STOCH_K_DEFAULT = 47 // Stochastic %K period
  • STOCH_D_DEFAULT = 9 // Stochastic %D period
  • STOCH_SLOWING_DEFAULT = 13 // Stochastic slowing
  • REG_STRONG_ADX = 28 // ADX >= this => StrongTrend
  • REG_RANGE_ADX = 20 // ADX <= this => range-ish
  • REG_COMP_BBZ = 0.8 // BB-width zscore <= => Compress
  • REG_EXP_BBZ = 1.5 // BB-width zscore >= => Expand
  • ...and 21 more

INPUT PARAMETERS (20 total across 7 groups):

  • [=== Identity ===] InpMagic = 22209009 // Magic number (2220000 + 556)
  • [=== Identity ===] InpTradeComment = "Psgrowth.com Expert_09009" // Trade comment
  • [=== Risk & Sizing ===] InpRiskPercent = 0.5 // Risk per trade, % of effective capital
  • [=== Risk & Sizing ===] InpDailyLossLimitPct = 3.0 // Daily loss limit, % of effective capital
  • [=== Risk & Sizing ===] InpWeeklyLossLimitPct = 6.0 // Weekly loss limit, % of effective capital
  • [=== Risk & Sizing ===] InpMaxLots = 5.0 // Hard cap on lot size per trade
  • [=== Risk & Sizing ===] InpMaxConcurrent = 1 // Max concurrent positions (this symbol/magic)
  • [=== Risk & Sizing ===] InpSlippagePoints = 20 // Max slippage in points
  • [=== Capital Allocation Cap ===] InpCapitalCapAmount = 0.0 // Cap amount in REAL equity $
  • [=== Capital Allocation Cap ===] InpCapitalCapFloor = 50.0 // Floor below which entries are blocked
  • [=== Signal (Pattern + Stochastic) ===] InpStochBuyMax = 30.0 // Stoch signal upper bound to confirm Hammer (Buy)
  • [=== Signal (Pattern + Stochastic) ===] InpStochSellMin = 70.0 // Stoch signal lower bound to confirm HangMan (Sell)
  • [=== Regime / Confirm ===] InpHTFBarAgree = 1 // 1=require HTF-EMA side agreement, 0=skip
  • [=== Regime / Confirm ===] InpMaxSpreadOverAvg = 3 // Max spread multiple over rolling avg (x), 0=off
  • [=== Exit / Manage ===] InpUseBreakEven = true // Enable break-even at BE_TRIGGER_R
  • [=== Exit / Manage ===] InpUsePartialTP = true // Enable partial TP at PARTIAL_TP_R
  • [=== Exit / Manage ===] InpUseATRTrail = true // Enable ATR trailing stop
  • [=== Exit / Manage ===] InpExitOnOppSignal = true // Exit on opposite candlestick pattern
  • [=== Dry-Run / Kill Switch ===] InpDryRun = true // Dry-run mode (no live orders)
  • [=== Dry-Run / Kill Switch ===] InpKillSwitch = false // Emergency kill switch (block all trading)
Pseudocode
// Pipsgrowth EX09009 MeanReversion — Execution Flow (from source analysis)
// Family: MeanReversion
// Hanging Man (bearish) / Hammer (bullish) candlestick on last CLOSED bar + Stochastic confirmation (Stoch<20 Buy / Stoch>80 Sell). 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 an H1 or H4 chart
  7. 7Set Bollinger Band period, deviation, RSI levels, and lot size
  8. 8Enable Allow Algo Trading and click OK

EA Parameters

ParameterDefaultDescription
InpMagic22209009Magic number (2220000 + 556)
InpTradeComment"Psgrowth.com Expert_09009"Trade comment
InpRiskPercent0.5Risk per trade, % of effective capital
InpDailyLossLimitPct3.0Daily loss limit, % of effective capital
InpWeeklyLossLimitPct6.0Weekly loss limit, % of effective capital
InpMaxLots5.0Hard cap on lot size per trade
InpMaxConcurrent1Max concurrent positions (this symbol/magic)
InpSlippagePoints20Max slippage in points
InpCapitalCapAmount0.0Cap amount in REAL equity $
InpCapitalCapFloor50.0Floor below which entries are blocked
InpStochBuyMax30.0Stoch signal upper bound to confirm Hammer (Buy)
InpStochSellMin70.0Stoch signal lower bound to confirm HangMan (Sell)
InpHTFBarAgree11=require HTF-EMA side agreement, 0=skip
InpMaxSpreadOverAvg3Max spread multiple over rolling avg (x), 0=off
InpUseBreakEventrueEnable break-even at BE_TRIGGER_R
InpUsePartialTPtrueEnable partial TP at PARTIAL_TP_R
InpUseATRTrailtrueEnable ATR trailing stop
InpExitOnOppSignaltrueExit on opposite candlestick pattern
InpDryRuntrueDry-run mode (no live orders)
InpKillSwitchfalseEmergency kill switch (block all trading)
Source Code (.mq5)Open Source
Pipsgrowth_com_EX09009.mq5
#property copyright "Pipsgrowth.com"
#property link      "https://pipsgrowth.com"
#property version   "2.00"
#property strict
#property description "Pipsgrowth.com EX09009 HangingManHammer Stoch — candlestick reversal + Stochastic confirm, full 12-layer stack."

#include <Trade\Trade.mqh>
#include <Trade\PositionInfo.mqh>
#include <Trade\SymbolInfo.mqh>
#include <Trade\AccountInfo.mqh>
#include <Trade\OrderInfo.mqh>
#include <Trade\DealInfo.mqh>

//================== TUNABLE CONSTANTS (NOT inputs) =================
#define ATR_REG_PERIOD        14              // ATR period for regime
#define ATR_PCTILE_LOOKBACK   100             // ATR percentile window
#define BB_REG_PERIOD         20              // Bollinger Band period (regime)
#define BB_REG_DEV            2.0             // Bollinger Band deviation
#define ADX_REG_PERIOD        14              // ADX period (regime)
#define HTF_TREND_PERIOD      50              // HTF EMA period
#define HTF_TIMEFRAME         PERIOD_H1       // HTF timeframe for trend agreement
#define MA_TREND_PERIOD       5               // short SMA for pattern trend context
#define STOCH_K_DEFAULT       47              // Stochastic %K period
#define STOCH_D_DEFAULT       9               // Stochastic %D period
#define STOCH_SLOWING_DEFAULT 13              // Stochastic slowing
#define REG_STRONG_ADX        28              // ADX >= this => StrongTrend
#define REG_RANGE_ADX         20              // ADX <= this => range-ish
#define REG_COMP_BBZ          0.8             // BB-width zscore <= => Compress
#define REG_EXP_BBZ           1.5             // BB-width zscore >= => Expand
#define ATR_PCTILE_STRONG     80              // ATR percentile >= => high vol
#define ATR_PCTILE_LOW        20              // ATR percentile <= => low vol
#define SL_ATR_MULT           1.8             // SL = ATR(closed bar) * mult
#define TP_ATR_MULT           3.0             // TP = ATR(closed bar) * mult
#define TRAIL_ATR_MULT        2.5             // ATR trailing distance
#define TRAIL_STEP_POINTS     10              // trail step (points)
#define BE_TRIGGER_R          1.0             // break-even trigger at 1.0R
#define PARTIAL_TP_R          1.0             // partial TP at 1.0R
#define PARTIAL_FRACTION      0.5             // partial close 50%
#define MAX_BARS_IN_TRADE     60              // time-based exit (bars)
#define MAX_SPREAD_POINTS     35              // spread cap (points)
#define MAX_DAILY_TRADES      5               // max entries per day
#define COOLDOWN_BARS_AFTER_LOSS 5           // cooldown after loss
#define MIN_RR_RATIO          1.2             // min reward:risk
#define SESSION_START_HOUR    7               // server-time session start
#define SESSION_END_HOUR      20              // server-time session end
#define NEWS_WINDOW_MIN       30              // manual news window (min around HH:00)
#define PYRAMID_MAX_LEVELS    5               // pyramid hard cap
#define PYRAMID_ATR_SPACING   1.5             // pyramid ATR spacing
#define PORTFOLIO_HEAT_CAP    0.06            // max portfolio heat 6%
#define MAX_TRADE_RETRIES     1               // trade-send retry on transient
#define INP_VERSION_TAG       "v2.00 MeanRev HangHam/Stoch"  // version tag (log only)

//================== INPUTS (18 total) ==============================
input group "=== Identity ==="
input long   InpMagic           = 22209009;                       // Magic number (2220000 + 556)
input string InpTradeComment    = "Psgrowth.com Expert_09009";        // Trade comment

input group "=== Risk & Sizing ==="
input double InpRiskPercent     = 0.5;      // Risk per trade, % of effective capital
input double InpDailyLossLimitPct = 3.0;    // Daily loss limit, % of effective capital

Full source code available on download

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

Tags:ex09009meanreversionpipsgrowthfreemt5xauusd

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_EX09009.mq5
File Size38.4 KB
Versionv2.00
PlatformMetaTrader 5
File Type.mq5 Source
StrategyMean Reversion
Risk LevelMedium Risk
Timeframes
M5H1
Currency Pairs
XAUUSD
Min. Deposit$100