P
PipsGrowth
Trend FollowingOpen Source – Free

Pipsgrowth EX18077 TrendFollow

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

Pipsgrowth.com EX18077 Hull_Donchian_Momentum — Dual Hull MA + Donchian breakout + Momentum, full 12-layer stack.

Overview

Pipsgrowth EX18077 TrendFollow is a three-pillar trend-following EA that requires independent agreement from an inline dual Hull moving average, a manually computed Donchian channel, and a 14-period Momentum oscillator before any order is sent. Magic 22218077, version 2.00, MQL5 strict.

The Hull is not loaded as a custom indicator — it is built in OnInit from four iMA handles in MODE_LWMA. For the fast composite (default period 9) the EA allocates two WMA primitives, one of period 4 (n/2) and one of period 9 (n). The actual Hull value used by the strategy is computed on every bar in UpdateIndicators as g_fastHull = 2.0 * fastWMA1[0] - fastWMA2[0], which is the standard Hull approximation Hull(n) = 2*WMA(n/2) - WMA(n). The slow composite mirrors the pattern at default period 21 (WMA(10) and WMA(21)). The applied price for both Hulls is user-selectable via InpHullPrice (1=close, 2=open, 3=high, 4=low, 5=median, 6=typical, 7=weighted) and is converted to ENUM_APPLIED_PRICE once in OnInit via MapAppliedPriceInt().

The Donchian is also a manual computation, not iCustom or iDonchian. UpdateIndicators calls CopyHigh(_Symbol, PERIOD_CURRENT, 1, InpDonchianPeriod=20, highs) and CopyLow(...). The upper band is the maximum of the 20 previous highs, the lower band is the minimum of the 20 previous lows, and the midpoint that the signal logic uses is the simple average of the two. The Momentum line is the only piece of the signal that uses a standard iMomentum(_Symbol, PERIOD_CURRENT, InpMomentumPeriod=14, PRICE_CLOSE) call, and the threshold is user-controlled via InpMomentumThreshold (default 100.0, the neutral reading).

GetSignal() is the only entry decision. It runs on the closed bar (close1 = iClose shift 1) and returns +1 for buy, -1 for sell, or 0 for no trade. A buy requires all three pillars to agree: g_fastHull > g_slowHull (fast Hull above slow Hull), close1 > (donchianUpper + donchianLower) / 2.0 (previous bar's close above the Donchian midpoint), and g_momentum > InpMomentumThreshold (Momentum above the threshold). A sell mirrors the three conditions. There is no regime classifier, no separate confirm stack, and no confidence weighting — the three pillars are themselves the filter. The function also includes a static debugCounter that prints the indicator state every 100 calls so the strategy values are visible in the Experts log when running in the tester.

Lot sizing is driven by InpStopLoss. With InpLotMode = LOT_MODE_RISK (the default), CalculateLotSize multiplies AccountInfoDouble(ACCOUNT_BALANCE) * InpRiskPercent / 100.0 to get the risk money, then divides by the per-point stop value derived from SYMBOL_TRADE_TICK_VALUE and SYMBOL_TRADE_TICK_SIZE. NormalizeLot() then floors the result to the symbol's lot step, clamps to (minLot, maxLot), and caps at InpMaxLotSize = 5.0 lots. LOT_MODE_FIXED bypasses the risk math and uses InpFixedLotSize = 0.01 directly. Margin is checked via OrderCalcMargin before each open; if free margin is insufficient, the order is rejected and not retried.

Order submission has a 3-attempt retry loop keyed on the result retcode. OpenPosition() does trade.Buy(lot, _Symbol, 0, sl, tp, InpTradeComment) (or trade.Sell for shorts) and inspects the return code. If it is REQUOTE, PRICE_CHANGED, PRICE_OFF, or TIMEOUT, the EA sleeps 100ms, refreshes the ask/bid, recomputes SL/TP against the new price, and retries. Other retcodes break the loop immediately. The same retry pattern shows up in TryClose_EX18077 and TryClosePartial_EX18077 (both 3 attempts, 200ms gaps, retry on the same four retcodes) and in TryModify_EX18077 (3 attempts, 100ms gaps, retry on REQUOTE and TIMEOUT only). Filling mode is auto-detected once on init: FOK if the symbol advertises SYMBOL_FILLING_FOK, otherwise IOC, otherwise RETURN.

The trade-management ladder runs on every tick and is structured as three one-way ratchet stages. Stage 1 — Breakeven: when profitPoints >= InpBEStart = 200, the SL is moved to openPrice + InpBEOffset * _Point for longs (or minus the offset for shorts). Stage 2 — Trailing: when profit exceeds InpTrailStart = 300 points, the SL is set to currentPrice - InpTrailDistance * _Point (or plus for shorts), but only if that new SL is on the profitable side of the entry. Stage 3 — Tighten: when profit exceeds InpTightenStart = 600 points, the SL is squeezed to currentPrice - InpTightenDist * _Point (InpTightenDist = 80). Each stage only moves the SL in the favourable direction — the helper checks newSL > currentSL for longs (or < for shorts) before calling TryModify, and never relaxes the stop. There is no partial close and no scaled exit. A position runs to the original SL, the original TP, a forced full close triggered by the time filter, or a drawdown-limit close.

Pyramiding is implemented but disabled by default (InpAllowPyramid = false). When enabled, ManagePyramiding() walks the open positions on the same symbol and same magic, then refuses to add a new order unless two gates pass. Gate A: every existing same-direction position must have a 'secured' profit — defined as (sl - openPrice) / _Point for longs or the inverse for shorts — of at least InpMinSecuredProfit = 100 points. Gate B: the current price must be at least InpPyramidDistance = 300 points beyond the most recent entry in the profitable direction. The cap is InpMaxPyramid = 3 levels. Each pyramid add reuses OpenPosition(), which means the new lot is sized independently from InpStopLoss alone — pyramid entries do not blend into a combined basket SL.

Drawdown protection is the only equity-side safety net. CheckDrawdownLimits() recomputes two losses each tick: the daily loss as (g_dailyStartBalance - currentBalance) / g_dailyStartBalance * 100, and the equity loss as (g_peakEquity - currentEquity) / g_peakEquity * 100. g_dailyStartBalance is reset on the first bar of each new day in CheckNewDay(); g_peakEquity ratchets upward on every tick so the threshold stays anchored to the high watermark. If the daily loss hits InpMaxDailyLoss = 3.0% or the equity loss hits InpMaxEquityLoss = 10.0% from peak, the EA sets g_ddLimitHit = true, logs the reason, fires an Alert(), and — because InpCloseOnDDLimit = true by default — calls CloseAllPositions(). New entries are blocked for the rest of the day; the flag is cleared the next morning when CheckNewDay sees a new trading day.

The time filter is optional (InpUseTimeFilter = false by default). When on, CheckTimeFilter() blocks all of Saturday and Sunday, optionally blocks Friday via InpTradeFriday, and on Friday triggers a full CloseAllPositions() at InpFridayCloseHour = 20. Entries are also blocked outside InpStartHour..InpEndHour (08:00..20:00 server by default). The spread cap is independent of the time filter: CheckSpread() reads SYMBOL_SPREAD in points and rejects the entire tick if it exceeds InpMaxSpread = 300 (3.0 pips on a 5-digit broker). Slippage is set at init via trade.SetDeviationInPoints(InpSlippage = 30).

The information panel is a 220×160 dark-slate rectangle drawn in the upper-left via OBJ_RECTANGLE_LABEL, with seven OBJ_LABEL children: the EA name, the current trend label (BULLISH/BEARISH/FLAT, derived from the Hull relationship), the live spread in points, the buy/sell position counts, the unrealised P/L summed across the magic's positions, the live Momentum reading, and the drawdown-limit status. The panel is purely diagnostic — turning it off via InpShowPanel = false does not affect the trading logic.

The strategy ships with exactly 5 indicator handles (4 WMA primitives for the two Hull composites + iMomentum) and no OnTester function in the source. It is intentionally lightweight on indicators because the design assumes the user will test it across M5 and H1 on the four suggested symbols (XAUUSD, EURUSD, GBPUSD, USDJPY), where indicator indirection cost would be a real drag. There is no opposite-signal close and no per-trade time stop — a position that opens with a valid signal will stay open until one of the four exits fires: SL hit, TP hit, Friday's forced close, or the daily/equity drawdown limit trips. The lack of an opposite-signal exit is intentional: the 200/300/600-point ratchet staircase is what enforces the eventual exit when the trend reverses.

Strategy Deep Dive

On every tick the EA first runs CheckSpread (rejects the tick above 300 points) and CheckTimeFilter (off by default; blocks weekend + Friday-after-close + outside 08:00..20:00 when on), then runs CheckDrawdownLimits against the 3% daily and 10% equity-from-peak thresholds, then ManageOpenPositions ratchets the three-stage BE/trail/tighten SL on every position. After that, the OnTick gate waits for a new bar (g_lastBarTime check) and only then calls UpdateIndicators, which refreshes the four WMA primitives for the two inline Hulls, the iMomentum handle, and the manual Donchian via CopyHigh/CopyLow. GetSignal returns +1 or -1 only when fast Hull leads slow Hull, the previous bar's close is on the correct side of the Donchian midpoint, and Momentum is on the correct side of the threshold; any of the three failing means no new order. The order path sizes the lot from the SL via CalculateLotSize, checks free margin via OrderCalcMargin, then attempts trade.Buy or trade.Sell up to 3 times with 100ms gaps, retrying only on REQUOTE/TIMEOUT/PRICE_CHANGED/PRICE_OFF. When InpAllowPyramid is on, ManagePyramiding adds up to InpMaxPyramid = 3 same-direction positions only if each existing one has at least InpMinSecuredProfit = 100 points of secured profit and the current price is at least InpPyramidDistance = 300 points past the most recent entry in the profitable direction.

Entry Signal

A long entry fires when all three pillars agree on the closed bar: the fast inline Hull (default period 9, built as 2*WMA(4) − WMA(9)) is above the slow inline Hull (default period 21, 2*WMA(10) − WMA(21)), the previous bar's close is above the midpoint of the 20-bar manually-computed Donchian channel, and the 14-period iMomentum line is above InpMomentumThreshold (default 100.0). A short fires on the mirrored condition. The signal is read once per new bar (the OnTick gate checks g_lastBarTime), so intrabar ticks only manage open positions, never open new ones.

Exit Signal

Positions exit via the original SL (InpStopLoss = 500 points, set at open), the original TP (InpTakeProfit = 1500 points), a forced full close triggered on Friday after InpFridayCloseHour, or the daily/equity drawdown limit tripping in CheckDrawdownLimits (3% daily or 10% equity-from-peak). There is no opposite-signal close, no partial profit-take, and no per-trade time stop. The three-stage SL ratchet (breakeven at 200pt profit / 30pt offset, trail at 300pt / 150pt distance, tighten at 600pt / 80pt distance) is what progressively tightens the protective stop as the trade moves in favour.

Stop Loss

Fixed InpStopLoss = 500 points (5.0 pips on a 5-digit broker) is set at open via OpenPosition. Once profit crosses InpBEStart = 200 points the SL is ratcheted to open+30 points (breakeven plus offset). At 300 points profit the SL is trailed to current price ± InpTrailDistance = 150 points; at 600 points profit it tightens to current price ± InpTightenDist = 80 points. Every move is one-way — the helper checks newSL > currentSL (or < for shorts) before calling TryModify_EX18077, so the stop is never relaxed.

Take Profit

Fixed InpTakeProfit = 1500 points (15.0 pips on a 5-digit broker) is set at the same time as the SL via OpenPosition and is never modified after the fact. The TP is set in absolute price distance from entry and is sent to the broker in the original order request; there is no partial TP, no trailing TP, and no scaled exit. A value of 0 disables the TP entirely, leaving the position to be closed only by the SL, the Friday forced close, or the drawdown limit.

Best For

This EA is sized for a $100 minimum balance across XAUUSD, EURUSD, GBPUSD, and USDJPY on M5 and H1, with MEDIUM risk. The 3.0 pip spread cap (InpMaxSpread = 300 points) and 30-point slippage tolerance require a low-spread ECN or RAW-spread account — a standard retail account quoting 2+ pip spreads on XAUUSD will be filtered out before any signal is evaluated. InpUseTimeFilter should be enabled (08:00..20:00 server, Friday close at 20:00) for accounts on brokers with thin overnight liquidity, particularly for the JPY pair. The 0.5% default risk with a 5.0-lot cap and 3% daily / 10% equity-from-peak drawdown limit is appropriate for a $500 to $5,000 single-EA single-symbol deployment; for multi-symbol or multi-EA portfolios InpRiskPercent should be reduced to 0.25% or lower so the 3% daily loss ceiling is not breached by a single bad day across the book.

Strategy Logic

Pipsgrowth EX18077 TrendFollow — Strategy Logic Analysis (from .mq5 source)

Family: TrendFollow Magic: 22218077 Version: 2.00

BRIEF: Multi-indicator trend-following EA using dual Hull Moving Averages for trend direction, Donchian Channel for breakout confirmation, and Momentum for entry timing. BUY when Fast Hull > Slow Hull + price breaks Donchian upper + Momentum > 100. SELL on the mirror condition. Includes BE, trailing, pyramid and drawdown protection. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

INDICATOR STACK:

  • Standard MT5 indicators

KEY FUNCTIONS:

  • SetProperFillingMode()
  • UpdateIndicators()
  • GetSignal()
  • CheckSpread()
  • CheckTimeFilter()
  • CheckDrawdownLimits()
  • CheckNewDay()
  • CalculateLotSize()
  • NormalizeLot()
  • OpenPosition()
  • CountPositions()
  • ManageOpenPositions()
  • ...and 8 more

INTERNAL CONSTANTS (0 total):

INPUT PARAMETERS (42 total across 11 groups):

  • [=== Trade Execution ===] InpMagicNumber = 22218077 // Magic Number (222 + Expert ID)
  • [=== Trade Execution ===] InpSlippage = 30 // Max Slippage (points)
  • [=== Trade Execution ===] InpMaxSpread = 300 // Max Spread (points, 0=disable)
  • [=== Trade Execution ===] InpMaxRetries = 3 // Order Retry Attempts
  • [=== Trade Execution ===] InpTradeComment = "Psgrowth.com Expert_18077" // Trade Comment
  • [=== Money Management ===] InpLotMode = LOT_MODE_RISK // Lot Sizing Mode
  • [=== Money Management ===] InpFixedLotSize = 0.01 // Fixed Lot Size
  • [=== Money Management ===] InpRiskPercent = 0.5 // Risk Percent (%)
  • [=== Money Management ===] InpMaxLotSize = 5.0 // Maximum Lot Size
  • [=== SL/TP Settings ===] InpStopLoss = 500 // Stop Loss (points)
  • [=== SL/TP Settings ===] InpTakeProfit = 1500 // Take Profit (points, 0=disable)
  • [=== Strategy: Hull MA ===] InpFastHullPeriod = 9 // Fast Hull Period
  • [=== Strategy: Hull MA ===] InpSlowHullPeriod = 21 // Slow Hull Period
  • [=== Strategy: Hull MA ===] InpHullPrice = 1 // Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // Hull Applied Price
  • [=== Strategy: Donchian ===] InpDonchianPeriod = 20 // Donchian Channel Period
  • [=== Strategy: Momentum ===] InpMomentumPeriod = 14 // Momentum Period
  • [=== Strategy: Momentum ===] InpMomentumThreshold = 100.0 // Momentum Threshold (100=neutral)
  • [=== Time Filter ===] InpUseTimeFilter = false // Enable Time Filter
  • [=== Time Filter ===] InpStartHour = 8 // Start Hour (Server Time)
  • [=== Time Filter ===] InpEndHour = 20 // End Hour (Server Time)
  • [=== Time Filter ===] InpTradeFriday = true // Trade on Friday
  • [=== Time Filter ===] InpFridayCloseHour = 20 // Friday: Close All After Hour
  • [=== Trade Management ===] InpUseBreakeven = true // Enable Breakeven
  • [=== Trade Management ===] InpBEStart = 200 // BE Start (points profit)
  • [=== Trade Management ===] InpBEOffset = 30 // BE Offset (points above entry)
  • [=== Trade Management ===] InpUseTrailing = true // Enable Trailing Stop
  • [=== Trade Management ===] InpTrailStart = 300 // Trail Start (points profit)
  • [=== Trade Management ===] InpTrailDistance = 150 // Trail Distance (points)
  • [=== Trade Management ===] InpUseTighten = true // Enable Tighten SL
  • [=== Trade Management ===] InpTightenStart = 600 // Tighten Start (points profit)
  • [=== Trade Management ===] InpTightenDist = 80 // Tighten Distance (points)
  • [=== Pyramid Settings ===] InpAllowPyramid = false // Allow Pyramid Positions
  • [=== Pyramid Settings ===] InpMaxPyramid = 3 // Max Pyramid Levels
  • [=== Pyramid Settings ===] InpPyramidDistance = 300 // Min Distance Between Entries (points)
  • [=== Pyramid Settings ===] InpMinSecuredProfit = 100 // Min Secured Profit Before Next (points)
  • [=== Drawdown Protection ===] InpUseDDProtection = true // Enable Drawdown Protection
  • [=== Drawdown Protection ===] InpMaxDailyLoss = 3.0 // Max Daily Loss % (0=disabled)
  • [=== Drawdown Protection ===] InpMaxEquityLoss = 10.0 // Max Equity Loss % from Peak (0=disabled)
  • [=== Drawdown Protection ===] InpCloseOnDDLimit = true // Close All When DD Limit Hit
  • [=== Display ===] InpShowPanel = true // Show Info Panel
  • [=== Display ===] InpPanelX = 10 // Panel X Position
  • [=== Display ===] InpPanelY = 30 // Panel Y Position
Pseudocode
// Pipsgrowth EX18077 TrendFollow — Execution Flow (from source analysis)
// Family: TrendFollow
// Multi-indicator trend-following EA using dual Hull Moving Averages for trend direction, Donchian Channel for breakout confirmation, and Momentum for entry timing. BUY when Fast Hull > Slow Hull + price breaks Donchian upper + Momentum > 100. SELL on the mirror condition. Includes BE, trailing, pyramid and drawdown protection. 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:
XAUUSDEURUSDGBPUSDUSDJPY
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 H4 or Daily chart for best results
  7. 7Configure EMA periods, ADX threshold, and lot size in the dialog
  8. 8Enable Allow Algo Trading and click OK

EA Parameters

ParameterDefaultDescription
InpMagicNumber22218077Magic Number (222 + Expert ID)
InpSlippage30Max Slippage (points)
InpMaxSpread300Max Spread (points, 0=disable)
InpMaxRetries3Order Retry Attempts
InpTradeComment"Psgrowth.com Expert_18077"Trade Comment
InpLotModeLOT_MODE_RISKLot Sizing Mode
InpFixedLotSize0.01Fixed Lot Size
InpRiskPercent0.5Risk Percent (%)
InpMaxLotSize5.0Maximum Lot Size
InpStopLoss500Stop Loss (points)
InpTakeProfit1500Take Profit (points, 0=disable)
InpFastHullPeriod9Fast Hull Period
InpSlowHullPeriod21Slow Hull Period
InpHullPrice1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // Hull Applied Price
InpDonchianPeriod20Donchian Channel Period
InpMomentumPeriod14Momentum Period
InpMomentumThreshold100.0Momentum Threshold (100=neutral)
InpUseTimeFilterfalseEnable Time Filter
InpStartHour8Start Hour (Server Time)
InpEndHour20End Hour (Server Time)
InpTradeFridaytrueTrade on Friday
InpFridayCloseHour20Friday: Close All After Hour
InpUseBreakeventrueEnable Breakeven
InpBEStart200BE Start (points profit)
InpBEOffset30BE Offset (points above entry)
InpUseTrailingtrueEnable Trailing Stop
InpTrailStart300Trail Start (points profit)
InpTrailDistance150Trail Distance (points)
InpUseTightentrueEnable Tighten SL
InpTightenStart600Tighten Start (points profit)
InpTightenDist80Tighten Distance (points)
InpAllowPyramidfalseAllow Pyramid Positions
InpMaxPyramid3Max Pyramid Levels
InpPyramidDistance300Min Distance Between Entries (points)
InpMinSecuredProfit100Min Secured Profit Before Next (points)
InpUseDDProtectiontrueEnable Drawdown Protection
InpMaxDailyLoss3.0Max Daily Loss % (0=disabled)
InpMaxEquityLoss10.0Max Equity Loss % from Peak (0=disabled)
InpCloseOnDDLimittrueClose All When DD Limit Hit
InpShowPaneltrueShow Info Panel
InpPanelX10Panel X Position
InpPanelY30Panel Y Position
Source Code (.mq5)Open Source
Pipsgrowth_com_EX18077.mq5
#property copyright "Pipsgrowth.com"
#property link      "https://pipsgrowth.com"
#property version   "2.00"
#property strict
#property description "Pipsgrowth.com EX18077 Hull_Donchian_Momentum — Dual Hull MA + Donchian breakout + Momentum, full 12-layer stack."
#include <Trade\Trade.mqh>

//+------------------------------------------------------------------+
//| ENUMS                                                            |
//+------------------------------------------------------------------+
enum ENUM_LOT_MODE
{
   LOT_MODE_FIXED = 0,  // Fixed Lot Size
   LOT_MODE_RISK  = 1   // Risk % of Balance
};

//+------------------------------------------------------------------+
//| ENUM_APPLIED_PRICE MapAppliedPriceInt(int ap)
{
   switch(ap)
   {
      case 1: return PRICE_CLOSE;
      case 2: return PRICE_OPEN;
      case 3: return PRICE_HIGH;
      case 4: return PRICE_LOW;
      case 5: return PRICE_MEDIAN;
      case 6: return PRICE_TYPICAL;
      case 7: return PRICE_WEIGHTED;
      default: return PRICE_CLOSE;
   }
}
ENUM_APPLIED_PRICE g_InpHullPrice = PRICE_CLOSE;
INPUT GROUP: Trade Execution                                     |
//+------------------------------------------------------------------+
ENUM_APPLIED_PRICE MapAppliedPriceInt(int ap)
{
   switch(ap)
   {
      case 1: return PRICE_CLOSE;
      case 2: return PRICE_OPEN;
      case 3: return PRICE_HIGH;
      case 4: return PRICE_LOW;
      case 5: return PRICE_MEDIAN;
      case 6: return PRICE_TYPICAL;
      case 7: return PRICE_WEIGHTED;
      default: return PRICE_CLOSE;
   }
}
ENUM_APPLIED_PRICE g_InpHullPrice = PRICE_CLOSE;
input group "=== Trade Execution ==="
input int            InpMagicNumber     = 22218077;        // Magic Number (222 + Expert ID)
input int            InpSlippage        = 30;            // Max Slippage (points)
input int            InpMaxSpread       = 300;           // Max Spread (points, 0=disable)
input int            InpMaxRetries      = 3;             // Order Retry Attempts
input string         InpTradeComment    = "Psgrowth.com Expert_18077"; // Trade Comment

//+------------------------------------------------------------------+
//| ENUM_APPLIED_PRICE MapAppliedPriceInt(int ap)
{
   switch(ap)

Full source code available on download

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

Tags:ex18077trendfollowpipsgrowthfreemt5xauusdeurusdgbpusdusdjpy

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_EX18077.mq5
File Size44.1 KB
Versionv2.00
PlatformMetaTrader 5
File Type.mq5 Source
StrategyTrend Following
Risk LevelMedium Risk
Timeframes
M5H1
Currency Pairs
XAUUSDEURUSDGBPUSDUSDJPY
Min. Deposit$100