P
PipsGrowth
OtherOpen Source – Free

Pipsgrowth EX17011 Volatility

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

Pipsgrowth.com EX17011 gaussian_Real — Gaussian Adaptive EA with ADX/MACD/RSI auto-tuning and drawdown protection, full 12-layer stack.

Overview

Pipsgrowth EX17011 takes the ADX/MACD/RSI trio you have probably seen a hundred times and bolts a self-tuning layer on top. The headline mechanism is the Gaussian window: on every tick, the EA feeds its current ADX period, MACD fast/slow/signal periods, and RSI period through a 20-element Gaussian kernel (sigma = window/6, then normalized to sum to 1) and uses the smoothed output as the live period for that indicator. Because the kernel weights a center point highest and tapers symmetrically outward, indicator periods drift in small, smooth steps rather than jumping on the next tick. The drift is anchored by the user inputs (ADX_Period=14, MACD_FastEMA=12, MACD_SlowEMA=26, MACD_SignalSMA=9, RSI_Period=14) and is bounded by hard clamps in code — ADX is constrained to [10, 30], MACD fast to [8, 20], MACD slow to [20, 40], MACD signal to [5, 15], RSI to [8, 25] — so the EA cannot drift into nonsense territory. When the smoothed period shifts by more than a threshold (1.0 for MACD, 2.0 for ADX/RSI) versus the last refresh, RefreshIndicators() releases the old handles and re-creates the ADX, MACD, RSI, and ATR(14) handles on PERIOD_M5.

The real differentiator is the second tuning loop in UpdateMarketBasedParameters(). Every 50 trades by default (TuningPeriod=50), CalculatePerformanceMetrics() recomputes the rolling win rate and average profit from the in-memory tradeHistory[] array (capped at 100 entries). If the win rate falls below MinWinRate=60% and the history has at least 11 trades, the EA switches into a regime-specific adjustment: in a ranging market it pulls the ADX period down to 0.8x (minimum 10) and RSI to 0.9x (minimum 8) to make signals more sensitive; in a trending market it tightens MACD fast to 0.9x and widens MACD slow to 1.1x so the indicator reads longer swings; in a volatile market it widens ADX to 1.2x and RSI to 1.1x to make entries more conservative. A second branch fires when the win rate is above 75% with positive average profit, in which case the EA can reduce MACD fast and RSI periods by 5% in a volatile regime to harvest more entries from a hot streak. None of this tuning kicks in until the market classifier — built from a 20-bar ATR(14) average plus an SMA20/SMA50 spread (in pips, threshold 5.0) and ADX rising — tags the regime as ranging (0), trending (1), or volatile (2). The classifier prints its verdict roughly every 100 ticks via the tickCount static counter.

Signal scoring is where the three indicators come together. CheckBuySignalStrength() and CheckSellSignalStrength() walk the same scoring tree from opposite ends. ADX contributes 1.5 when ADX(14) is above the 25 threshold with a +DI/-DI confirmation that is both dominant and rising, 1.0 for a moderate trend at 0.8x the threshold, and 0.5 for any ADX print above 0.6x the threshold regardless of direction. MACD adds 1.0 for a fresh signal-line cross in the trade direction, 0.5 if the main line is rising (for buys) or falling (for sells) and on the correct side of the signal. RSI adds 1.0 at full oversold (buys) or overbought (sells), 0.5 for a recovery-from-extreme read. A 0.5 bonus is awarded when the regime classifier agrees with the trade (trending market + trend trade, or ranging market with sub-100-point volatility). The final MathRound of that score is compared to MinSignalStrength=2, so a buy needs at least two full points of confluence to trigger — typically a moderate-or-better ADX plus either a fresh MACD cross or an RSI extreme.

Risk and trade management follow a clean 2% / 20-pip / 15-pip template with three twists. CalculateLotSizeByRisk() uses the broker's tick value and tick size to back out a pip value (tickValue × 0.0001 / tickSize), then sizes the lot to risk exactly RiskPercent × adjustedRisk of balance against StopLossPips of distance. The adjusted risk is RiskPercent × currentRiskMultiplier, and that multiplier is what the drawdown protection layer rewrites — once drawdown crosses ReduceRiskAtDrawdown=10%, the multiplier begins a linear decline toward RiskReductionFactor=0.5 (50%) of the configured risk as drawdown approaches the 15% cap, with a 0.1 floor. The second twist is the SL/TP scaling in OpenPosition(): in a volatile regime the SL is multiplied by 1.3 and the TP by 1.5; in a trending regime the SL is tightened to 0.8x and TP widened to 1.2x; a signal strength of 3 or higher tightens SL another 10% and widens TP another 20%. The third twist is the trailing pair: ManagePositions() ratchets the stop loss forward by 2 pips once profit reaches 10 pips (TrailingStopStartPips, TrailingStopStepPips), and at 5 pips of profit it begins pulling the take profit toward price by 1 pip per pip of additional profit (TrailingTPStartPips, TrailingTPStepPips) — effectively turning the 15-pip TP into a trailing target that locks in gains while letting winners run.

The exit logic is the most opinionated part of the EA. CloseOnOppositeSignal=true together with CloseOnlyProfitable=true and MinProfitToClose=$1.0 means that when the opposing signal crosses the MinSignalStrength threshold, the EA walks all positions of the opposite type and closes only those that are at least a dollar in the green, skipping anything red. The print log on each pass records both the closed count and the skipped count, and the trade comment on every order is suffixed with the signal strength it was opened on (Psgrowth.com Expert_17011_S2, _S3, etc.) so post-trade analysis can correlate strength with outcome. Order-execution helpers TryClose_EX17011, TryClosePartial_EX17011, and TryModify_EX17011 each loop up to three attempts and resleep 100–200 ms on requote/timeout/price-change/price-off errors before giving up. There are no explicit basket-TP, no time-decay exits, and no per-position martingale. A position that is not closed by the trailing TP, the opposite-signal logic, or a StopTradingOnDrawdown event simply runs until SL or TP hits.

The drawdown protection layer is the seatbelt over the whole system. UpdateDrawdownProtection() runs first thing on every tick when EnableDrawdownProtection=true. It tracks both the equity-curve peak (maxEquity) and the balance-curve peak (maxBalance) and picks which one to reference via UseEquityDrawdown=true (default). Two thresholds are monitored: a MaxDrawdownPercent=15 and a MaxDrawdownAmount=$1000 — whichever fires first, plus a DailyDrawdownLimit=5.0 percent measured against the start-of-day equity. When the limit is breached, the EA flips drawdownProtectionActive=true, fires an Alert() pop-up with the violation string, and — if CloseAllOnDrawdown=true (default false) — calls CloseAllPositionsOnDrawdown() to flatten the book. With the default config, it just stops opening new trades (StopTradingOnDrawdown=true short-circuits the rest of OnTick()). Recovery requires waiting DrawdownRecoveryBars=100 M5 bars — about 8 hours and 20 minutes — and the drawdown to compress back below half of the cap before the next trade is allowed. While the system is throttled, the chart comment shows live balance, equity, both drawdowns, the risk multiplier, the adjusted risk percent, the daily trade count, and the regime label, all on every tick.

The trade-offs are worth naming. The 2% risk paired with a 15-pip TP is a fast-turnover profile: 100 daily trades (MaxDailyTrades) is a hard ceiling rather than a target, and the asymmetric SL>TP (20>15) means the system depends on the trailing TP and the opposite-signal close to deliver the actual average win. The signal-strength minimum of 2 is a deliberate quality filter — it filters out bare-MACD crossovers and bare-RSI extremes — but the two-bonus market-condition awards mean a strong-regime alignment can carry a weak-individual print across the line. The adaptive layer is conservative by design: parameters can only shift inside bounded ranges, only re-evaluate every 50 trades, and only adjust when the win rate breaches the 60% or 75% thresholds, so a one-off bad trade does not destabilize the period set. On the backtest side, expect a long warm-up: the trade history needs at least 11 closes before UpdateMarketBasedParameters() engages, so the first ~20 trades of any run will use the fixed input periods verbatim. The 3-pip max-spread filter is tight for XAUUSD on a low-liquidity session — gold spreads regularly exceed 3 pips outside the London/NY overlap, which means the EA effectively sits out the Asian session. For a $100 minimum deposit and a 2% risk, the implied minimum lot at 20 pips of stop on XAUUSD is around 0.01; that is the floor the EA will respect, so the first few weeks of a small account will feel slow regardless of how the strategy is performing.

Strategy Deep Dive

Every tick of the M5 chart runs through UpdateDrawdownProtection first — if the equity-curve drawdown is breaching 15% or $1000, the EA flips StopTradingOnDrawdown and the rest of the tick short-circuits. Otherwise it pulls a fresh 20-bar ATR(14), 5-bar ADX(14) (+DI, -DI), 5-bar MACD(12,26,9), and 3-bar RSI(14) read from the iADX/iMACD/iRSI/iATR handles created in OnInit. AnalyzeMarketConditions() classifies the regime as ranging / trending / volatile from the ATR-vs-20-bar-average ratio plus an SMA20/SMA50 spread (5-pip threshold) and an ADX-rising check. UpdateMarketBasedParameters() then Gaussian-smooths the current ADX/MACD/RSI periods with a 20-element kernel and, if the live win rate over the last 50 trades has fallen below 60%, shifts the smoothed periods toward regime-appropriate defaults (clamped inside [10,30] for ADX, [8,20]/[20,40]/[5,15] for MACD, [8,25] for RSI). The signal-strength scorers then sum ADX (1.5/1.0/0.5) + MACD cross (1.0/0.5) + RSI extreme (1.0/0.5) + regime-confluence bonus (0.5), MathRound it, and compare to MinSignalStrength=2 before opening a position. OrderSend is wrapped in the standard 3-retry scaffold (TryClose_EX17011 / TryModify_EX17011 with 100–200 ms sleep on requote / timeout / price-off / price-change errors), lot size is recomputed from the live tick value against the (possibly drawdown-adjusted) 2% risk, and the order comment is suffixed with the signal strength it was opened on (S2, S3, etc.) for later correlation analysis.

Entry Signal

A long entry fires when the Gaussian-smoothed ADX(14) reads above 25 with +DI dominant over -DI and the 12/26 MACD main line crosses above the 9-period signal, hitting the MathRound(score) ≥ 2 threshold (MinSignalStrength=2). A short entry mirrors that: ADX confirming -DI dominance plus a bearish MACD signal cross, with an RSI(14) overbought tag (≥70) acting as the third potential contributor. Trend-confluence bonuses from the regime classifier (trending or low-volatility ranging) can carry a weaker individual print across the line, and the entry lot is sized to risk exactly 2% of the adjusted balance (post drawdown multiplier) over the 20-pip stop.

Exit Signal

The primary exit is the opposite-signal close: when the opposing direction crosses the MinSignalStrength=2 threshold, ClosePositionsOnOppositeSignal walks every position of the losing type and closes only those sitting at least $1 in the green (CloseOnlyProfitable=true, MinProfitToClose=1.0), leaving red trades to run to their stops. A secondary exit comes from the trailing pair: a 2-pip step-trailing stop activates at 10 pips of profit, and a 1-pip step-trailing take-profit tightens toward price once profit reaches 5 pips, effectively ratcheting the 15-pip TP down into a moving target. Hard SL and TP at 20 and 15 pips (modified 1.3×/1.5× in volatile, 0.8×/1.2× in trending) are the final floor.

Stop Loss

Fixed 20-pip stop loss on every entry, scaled by 1.3× in a volatile regime and tightened to 0.8× in a trending regime; a 2-pip step trailing stop kicks in once profit reaches 10 pips, with the trail ratcheting forward only (never backward). A drawdown-protection layer additionally rewrites the lot size via a risk multiplier that drops linearly from 1.0 toward 0.5 between 10% and 15% equity-curve drawdown, floored at 0.1 of the configured 2% per-trade risk.

Take Profit

Fixed 15-pip take profit per trade, scaled by 1.5× in volatile regimes and 1.2× in trending, with a strong-signal (≥3) bonus that widens it another 20%. Once profit reaches 5 pips, a 1-pip step trailing take-profit pulls the TP toward price — turning the static target into a moving one that locks in gains while letting winners extend beyond the original 15-pip cap.

Best For

Best for XAUUSD M5 traders running a $100 minimum account through a low-spread ECN broker with sub-$1.50 typical gold spreads, since the 3-pip MaxSpreadPips filter will sit the EA out during the Asian session. The 2% default risk makes this a medium-throughput profile, not a long-term hold system — expect multiple entries per London/NY session rather than swing-style exposure. The drawdown-protection layer (15% / $1000 / 5% daily) is sized for small accounts: if you scale up to $5,000 or above, raise MaxDrawdownAmount proportionally or risk the percentage gate tripping on normal volatility. Skip this EA if you need a long-only or short-only bias — the symmetric entry logic takes both directions whenever ADX and MACD agree.

Strategy Logic

Pipsgrowth EX17011 Volatility — Strategy Logic Analysis (from .mq5 source)

Family: Volatility Magic: 22217011 Version: 2.00

BRIEF: Gaussian Adaptive EA using ADX, MACD, and RSI with market-based auto-tuning and drawdown protection. Closes positions on opposite signals, supports flexible signal matching, trailing SL/TP. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

INDICATOR STACK:

  • Standard MT5 indicators

KEY FUNCTIONS:

  • CalculateGaussianWeights()
  • UpdateAdaptiveParameters()
  • AnalyzeMarketConditions()
  • UpdateMarketBasedParameters()
  • CalculatePerformanceMetrics()
  • GaussianSmooth()
  • RefreshIndicators()
  • CheckBuySignalStrength()
  • CheckSellSignalStrength()
  • CountPositions()
  • OpenPosition()
  • CalculateLotSizeByRisk()
  • ...and 12 more

INTERNAL CONSTANTS (0 total):

INPUT PARAMETERS (41 total across 11 groups):

  • [=== Risk Management ===] RiskPercent = 2.0 // Risk percent per trade
  • [=== Risk Management ===] MaxPositions = 2 // Max simultaneous positions
  • [=== Risk Management ===] MaxDailyTrades = 100 // Max trades per day
  • [=== Risk Management ===] MaxSpreadPips = 3.0 // Max spread allowed
  • [=== Risk Management ===] Slippage = 5 // Max slippage in points
  • [=== Risk Management ===] StopLossPips = 20 // Stop loss in pips
  • [=== Risk Management ===] TakeProfitPips = 15 // Take profit in pips
  • [=== Gaussian & Adaptive Settings ===] GaussianWindow = 20 // Window for gauss averaging
  • [=== Gaussian & Adaptive Settings ===] EnableMarketBasedTuning = true // Enable market-based auto-tuning
  • [=== Gaussian & Adaptive Settings ===] TuningPeriod = 50 // Trades to analyze for tuning
  • [=== Gaussian & Adaptive Settings ===] MinWinRate = 60.0 // Minimum win rate to maintain
  • [=== Signal Configuration ===] UseFlexibleSignals = true // Allow partial signal matches
  • [=== Signal Configuration ===] MinSignalStrength = 2 // Minimum signals required (1-3)
  • [=== Position Management ===] CloseOnOppositeSignal = true // Close positions on opposite signal
  • [=== Position Management ===] CloseOnlyProfitable = true // Close only profitable positions
  • [=== Position Management ===] MinProfitToClose = 1.0 // Minimum profit in $ to consider closing
  • [=== ADX Indicator ===] ADX_Period = 14 // Initial ADX Period
  • [=== ADX Indicator ===] ADX_Threshold = 25.0 // Initial ADX Threshold
  • [=== MACD Indicator ===] MACD_FastEMA = 12 // Initial MACD Fast EMA Period
  • [=== MACD Indicator ===] MACD_SlowEMA = 26 // Initial MACD Slow EMA Period
  • [=== MACD Indicator ===] MACD_SignalSMA = 9 // Initial MACD Signal SMA Period
  • [=== RSI Indicator ===] RSI_Period = 14 // Initial RSI Period
  • [=== RSI Indicator ===] RSI_Overbought = 70.0 // RSI Overbought level
  • [=== RSI Indicator ===] RSI_Oversold = 30.0 // RSI Oversold level
  • [=== Trailing Stop Loss ===] UseTrailingStop = true // Enable trailing stop loss
  • [=== Trailing Stop Loss ===] TrailingStopStartPips = 10 // Trailing SL start after profit in pips
  • [=== Trailing Stop Loss ===] TrailingStopStepPips = 2 // Trailing SL step pips
  • [=== Trailing Take Profit ===] UseTrailingTP = true // Enable trailing take profit
  • [=== Trailing Take Profit ===] TrailingTPStartPips = 5 // Start trailing TP after this many pips
  • [=== Trailing Take Profit ===] TrailingTPStepPips = 1 // Trailing TP step pips
  • [=== General Settings ===] MagicNumber = 22217011 // Order magic number
  • [=== Drawdown Protection ===] EnableDrawdownProtection = true // Enable drawdown protection
  • [=== Drawdown Protection ===] MaxDrawdownPercent = 15.0 // Maximum drawdown percentage
  • [=== Drawdown Protection ===] MaxDrawdownAmount = 1000.0 // Maximum drawdown amount in account currency
  • [=== Drawdown Protection ===] StopTradingOnDrawdown = true // Stop trading when max drawdown reached
  • [=== Drawdown Protection ===] CloseAllOnDrawdown = false // Close all positions on max drawdown
  • [=== Drawdown Protection ===] ReduceRiskAtDrawdown = 10.0 // Reduce risk when drawdown exceeds this %
  • [=== Drawdown Protection ===] RiskReductionFactor = 0.5 // Risk reduction factor (0.5 = 50% reduction)
  • [=== Drawdown Protection ===] DrawdownRecoveryBars = 100 // Bars to wait after drawdown for recovery
  • [=== Drawdown Protection ===] UseEquityDrawdown = true // Use equity-based drawdown (vs balance)
  • [=== Drawdown Protection ===] DailyDrawdownLimit = 5.0 // Daily drawdown limit percentage
Pseudocode
// Pipsgrowth EX17011 Volatility — Execution Flow (from source analysis)
// Family: Volatility
// Gaussian Adaptive EA using ADX, MACD, and RSI with market-based auto-tuning and drawdown protection. Closes positions on opposite signals, supports flexible signal matching, trailing SL/TP. 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
RiskPercent2.0Risk percent per trade
MaxPositions2Max simultaneous positions
MaxDailyTrades100Max trades per day
MaxSpreadPips3.0Max spread allowed
Slippage5Max slippage in points
StopLossPips20Stop loss in pips
TakeProfitPips15Take profit in pips
GaussianWindow20Window for gauss averaging
EnableMarketBasedTuningtrueEnable market-based auto-tuning
TuningPeriod50Trades to analyze for tuning
MinWinRate60.0Minimum win rate to maintain
UseFlexibleSignalstrueAllow partial signal matches
MinSignalStrength2Minimum signals required (1-3)
CloseOnOppositeSignaltrueClose positions on opposite signal
CloseOnlyProfitabletrueClose only profitable positions
MinProfitToClose1.0Minimum profit in $ to consider closing
ADX_Period14Initial ADX Period
ADX_Threshold25.0Initial ADX Threshold
MACD_FastEMA12Initial MACD Fast EMA Period
MACD_SlowEMA26Initial MACD Slow EMA Period
MACD_SignalSMA9Initial MACD Signal SMA Period
RSI_Period14Initial RSI Period
RSI_Overbought70.0RSI Overbought level
RSI_Oversold30.0RSI Oversold level
UseTrailingStoptrueEnable trailing stop loss
TrailingStopStartPips10Trailing SL start after profit in pips
TrailingStopStepPips2Trailing SL step pips
UseTrailingTPtrueEnable trailing take profit
TrailingTPStartPips5Start trailing TP after this many pips
TrailingTPStepPips1Trailing TP step pips
MagicNumber22217011Order magic number
EnableDrawdownProtectiontrueEnable drawdown protection
MaxDrawdownPercent15.0Maximum drawdown percentage
MaxDrawdownAmount1000.0Maximum drawdown amount in account currency
StopTradingOnDrawdowntrueStop trading when max drawdown reached
CloseAllOnDrawdownfalseClose all positions on max drawdown
ReduceRiskAtDrawdown10.0Reduce risk when drawdown exceeds this %
RiskReductionFactor0.5Risk reduction factor (0.5 = 50% reduction)
DrawdownRecoveryBars100Bars to wait after drawdown for recovery
UseEquityDrawdowntrueUse equity-based drawdown (vs balance)
DailyDrawdownLimit5.0Daily drawdown limit percentage
Source Code (.mq5)Open Source
Pipsgrowth_com_EX17011.mq5
#property copyright "Pipsgrowth.com"
#property link      "https://pipsgrowth.com"
#property version   "2.00"
#property strict
#property description "Pipsgrowth.com EX17011 gaussian_Real — Gaussian Adaptive EA with ADX/MACD/RSI auto-tuning and drawdown protection, full 12-layer stack."
#include <Trade\Trade.mqh>

// Input Parameters
input group "=== Risk Management ==="
input double   RiskPercent            = 2.0;           // Risk percent per trade
input int      MaxPositions           = 2;             // Max simultaneous positions
input int      MaxDailyTrades         = 100;           // Max trades per day
input double   MaxSpreadPips          = 3.0;           // Max spread allowed
input int      Slippage               = 5;             // Max slippage in points
input int      StopLossPips          = 20;            // Stop loss in pips
input int      TakeProfitPips        = 15;            // Take profit in pips

input group "=== Gaussian & Adaptive Settings ==="
input int      GaussianWindow         = 20;            // Window for gauss averaging
input bool     EnableMarketBasedTuning = true;         // Enable market-based auto-tuning
input int      TuningPeriod           = 50;            // Trades to analyze for tuning
input double   MinWinRate             = 60.0;          // Minimum win rate to maintain

input group "=== Signal Configuration ==="
input bool     UseFlexibleSignals     = true;          // Allow partial signal matches
input int      MinSignalStrength      = 2;             // Minimum signals required (1-3)

input group "=== Position Management ==="
input bool     CloseOnOppositeSignal  = true;          // Close positions on opposite signal
input bool     CloseOnlyProfitable    = true;          // Close only profitable positions
input double   MinProfitToClose       = 1.0;          // Minimum profit in $ to consider closing

input group "=== ADX Indicator ==="
input int      ADX_Period             = 14;            // Initial ADX Period
input double   ADX_Threshold          = 25.0;          // Initial ADX Threshold

input group "=== MACD Indicator ==="
input int      MACD_FastEMA           = 12;            // Initial MACD Fast EMA Period
input int      MACD_SlowEMA           = 26;            // Initial MACD Slow EMA Period
input int      MACD_SignalSMA         = 9;             // Initial MACD Signal SMA Period

input group "=== RSI Indicator ==="
input int      RSI_Period             = 14;            // Initial RSI Period
input double   RSI_Overbought         = 70.0;          // RSI Overbought level
input double   RSI_Oversold           = 30.0;          // RSI Oversold level

input group "=== Trailing Stop Loss ==="
input bool     UseTrailingStop        = true;          // Enable trailing stop loss
input int      TrailingStopStartPips = 10;            // Trailing SL start after profit in pips
input int      TrailingStopStepPips  = 2;             // Trailing SL step pips

input group "=== Trailing Take Profit ==="
input bool     UseTrailingTP          = true;          // Enable trailing take profit
input int      TrailingTPStartPips   = 5;             // Start trailing TP after this many pips
input int      TrailingTPStepPips    = 1;             // Trailing TP step pips

input group "=== General Settings ==="
input int      MagicNumber            = 22217011;        // Order magic number
input string   InpTradeComment        = "Psgrowth.com Expert_17011";

Full source code available on download

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

Tags:ex17011volatilitypipsgrowthfreemt5xauusd

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