1. Fixed Fractional Risk & Risk-of-Ruin Mathematics
Every trading strategy with a non-zero stop-loss rate experiences losing streaks purely from statistical variance. Even an algorithm with an even 50% win rate has roughly a 1-in-10 chance of hitting four losses in a row over a modest sample of trades, and over hundreds of executions, 8-to-10-loss drawdown clusters are routine rather than black-swan anomalies. Position sizing—not entry indicator tuning—determines whether an account survives those cold clusters intact.
There is also an essential distinction on prop evaluation accounts: your nominal account balance is not your real risk capital. If a $100,000 account carries a 10% maximum drawdown limit ($10,000) and a 5% daily loss limit ($5,000), breaching either ceiling terminates the account. Risking 1% of the nominal $100,000 balance ($1,000) actually risks 10% of total drawdown headroom and 20% of daily headroom on a single stop-out.
| Risk / Trade | Remaining Equity (10 Losses, Compounded) | Compounded Drawdown | Linear Drawdown (Fixed $ on Initial) | Gain Needed to Recover | Prop & EA Assessment |
|---|---|---|---|---|---|
| 0.25% | 97.53% | -2.47% | -2.50% | +2.53% | Conservative baseline; absorbs extended drawdowns while preserving roughly half of a 5% daily limit even after multiple stops. |
| 0.50% | 95.11% | -4.89% | -5.00% | +5.14% | Balanced systematic risk for multi-trade strategies; requires careful correlation caps when more than two pairs open together. |
| 1.00% | 90.44% | -9.56% | -10.00% | +10.57% | Approaches a typical 10% total account loss boundary after 10 consecutive stops; unsafe when stacked across correlated trades. |
| 2.00% | 81.71% | -18.29% | -20.00% | +22.39% | Just three full losses (-6.0%) exceed a standard 5% daily loss limit; leaves almost no tolerance for normal losing streaks. |
| 5.00% | 59.87% | -40.13% | -50.00% | +67.02% | Single loss triggers a 5% daily breach threshold; incompatible with disciplined risk management or evaluation constraints. |
Asymmetric Recovery & Portfolio Correlation Limits
Notice how recovery requirements accelerate non-linearly: losing 18.29% requires a +22.39% return just to return to breakeven, whereas losing 40.13% requires +67.02%. Furthermore, nominal risk per trade breaks down if an Expert Advisor runs simultaneously across multiple symbols. Opening long EUR/USD, long GBP/USD, and short USD/CHF at 0.50% risk each stacks nearly 1.50% onto one shared USD-weakness bet during a Federal Reserve announcement. Enforce an aggregate open-risk cap inside the EA alongside per-position risk limits.
2. Static vs Trailing (EOD vs Intraday Equity) Drawdown Mechanics
Before configuring stop distances, trailing stops, or profit targets in an Expert Advisor, verify the exact drawdown formula governing the account. Two accounts advertised with identical “5% maximum drawdown” figures behave completely differently depending on whether the breach line is static, settled end-of-day, or trailed on intraday floating equity.
| Drawdown Structure | How Breach Floor Moves | Effect of Floating Winners | EA Strategy Compatibility |
|---|---|---|---|
| Static Drawdown | Fixed hard breach floor anchored to initial starting balance (for example, $90,000 on a $100,000 account with a 10% max loss). | Closed profits expand your working cushion one-for-one without raising the underlying breach floor. | Easiest structure for trend-following or swing EAs that hold open winners across pullbacks. |
| End-of-Day (EOD) Trailing | Breach floor trails the highest end-of-day settled balance (or daily rollover equity) recorded at server close, often capping at starting balance. | Intraday floating profit spikes that pull back before daily settlement do not permanently raise the breach floor. | Manageable for intraday and multi-day EAs, provided open risk before server rollover respects the daily loss rule. |
| Intraday Trailing Equity | Breach floor trails the highest real-time floating account equity tick-by-tick during open trades. | Even an unrealized profit spike that reverses before TP permanently drags the breach line closer to current equity. | Hostile to wide-target swing EAs or multi-basket averaging; demands tight partial profit-taking and trailing locks. |
Worked Example: How Intraday Equity Trailing Consumes Cushion
Assume a $100,000 account with a 5% ($5,000) trailing limit. Your EA opens a position that floats to +$3,200 unrealized profit (Equity = $103,200) before reversing and stopping out at -$500 (Balance = $99,500). Under Static or EOD Trailing, the breach floor stays at $95,000, leaving $4,500 of room. Under Intraday Trailing Equity, the $103,200 floating peak permanently pulls the breach floor to $98,200 ($103,200 − $5,000)—leaving only $1,300 before termination despite closing a minor 0.5% loss.
3. Daily Loss Limit & Server-Time Equity Guard Logic for EAs
Individual trade stop-losses do not guarantee compliance with daily drawdown rules. A reliable Expert Advisor must run an independent, account-wide Equity Guard module inside OnTick() and OnTimer() that measures real-time equity against the day's starting benchmark, accounts for all costs, and persists a lockout state across terminal restarts.
1. Correct Benchmark & Cost Accounting
- Anchor on Max(Balance, Equity): Most automated risk monitors set the daily floor from the higher of starting balance or starting equity at the reset hour (often 00:00 broker time or a specified UTC/EST cutoff).
- Include Commissions & Swaps: Using gross price profit alone understates drawdown. Evaluate
AccountInfoDouble(ACCOUNT_EQUITY)(excluding non-withdrawable broker credit) or sumProfit + Commission + Swapacross every open ticket on the account. - Watch Triple-Swap Wednesdays & Rollover: Overnight swap charges and midnight spread widening between 23:55 and 00:15 server time frequently cause technical breaches on accounts sitting near their daily limit.
2. Internal Cushion & Persistent Daily Lockout
- Set a Defensive EA Buffer: If the hard rule is 5.0% daily loss, configure your EA's equity kill-switch at 3.5%–4.0% so closing slippage and commissions cannot carry execution across the 5.0% wire.
- Flatten Positions + Cancel Pending Orders: When the guard trips, liquidate all open trades across all MagicNumbers and delete every pending Buy/Sell Limit or Stop order immediately.
- Persist State Outside RAM: Save the lockout date in MetaTrader
GlobalVariableSet()or a localMQL\Fileslock file. Storing the flag only in a C++/MQL variable clears it if the VPS reboots or you toggle timeframes.
MQL5 Concept Blueprint: Daily Equity Guard Check
// Snapshot dayAnchor at server rollover (align resetHour to firm Terms)
double currentEquity = AccountInfoDouble(ACCOUNT_EQUITY);
double maxDailyLossAmount = dayAnchor * (DailyStopPct / 100.0); // e.g., 3.8% buffer below 5% rule
double dailyBreachFloor = dayAnchor - maxDailyLossAmount;
if(currentEquity <= dailyBreachFloor)
{
CloseAllOpenPositionsAllSymbols();
DeleteAllPendingOrders();
PersistDailyLockFlag(CurrentResetDayKey());
return; // Halt all new entries until next verified reset window
}4. Prohibited Automated Practices to Verify Before Running Any EA
Passing mathematical drawdown rules does not protect an account if the Expert Advisor violates execution or compliance clauses in the firm's agreement. Audit these four operational areas in the current program rules before attaching any EA to an evaluation or funded server:
Tick-Scalping & Latency Arbitrage
Algorithms that exploit stale quote feeds between liquidity providers, hold trades for only a few seconds to capture micro-ticks, or flood the trade server with excessive order modifications per minute violate virtually every firm's toxic-flow policy. Check minimum trade-duration rules and server message limits.
Identical Third-Party Signal / Copy Clusters
Running commercial “challenge-pass” bots or public copy-trade feeds that generate identical entry timestamps, magic numbers, and stop distances across hundreds of unrelated users commonly triggers copy-trading or group-hedging flags. Always ensure your EA executes your own distinct parameters and risk schedule.
Weekend Gap Holding & Market-Close Exposure
Many programs mandate closing all open positions before Friday market close. Holding leveraged FX trades across Sunday opens exposes the account to weekend price gaps that skip stop-loss levels entirely, causing forced market fills well past daily loss thresholds. Program an automatic Friday pre-close exit timer when required.
Restricted High-Impact News Windows
Several prop rules restrict opening, closing, or placing pending straddle orders within two to five minutes before and after Tier-1 releases (such as NFP, CPI, or central-bank rate statements). Even where news trading is allowed, spreads widen unpredictably; implementing a calendar/time-window block inside the EA prevents unintended rule infractions and slippage spikes.
5. Session Spread Filters, Slippage Caps & Position Sizing Integration
Clean execution depends on checking live market conditions right before transmitting an order and pairing dynamic stop distances with exact position sizing. An EA that calculates lot sizes blindly without measuring current spreads or tick values will regularly absorb oversized losses during low liquidity windows.
Pre-Trade Spread Filter & Session Windows
Query SymbolInfoInteger(_Symbol, SYMBOL_SPREAD) (or (Ask - Bid) / _Point) on every entry signal and abort if spread exceeds a calibrated ceiling (for example, 1.5–2.0 pips on EUR/USD). Pair this check with a session filter that blocks new trades around the thin 23:00–01:00 server-time rollover window, when liquidity providers widen spreads dramatically and short-stop EAs get tagged out by Bid/Ask expansion rather than genuine price movement.
Slippage Caps & Market Execution Reality
Set an explicit maximum deviation parameter (such as 10–20 points on 5-digit brokers) for instant-execution quotes. Keep in mind that modern ECN / STP market-execution servers fill market orders at the next available liquidity price regardless of client slippage settings—which is why avoiding illiquid rollover windows and high-impact news spikes matters far more than relying solely on a terminal deviation integer.
Exact Lot Size Formula & Broker Volume Normalization
To keep dollar risk constant across pairs with differing pip values (such as EUR/USD vs EUR/GBP vs USD/JPY) and varying ATR stop widths, compute position size dynamically:
RawLots = RiskAmountUSD / (StopLossPips * PipValuePerStandardLotUSD)
NormalizedLots = MathFloor(RawLots / LotStep) * LotStep
Always round down with MathFloor rather than rounding to the nearest step, clamp the final volume between SYMBOL_VOLUME_MIN and SYMBOL_VOLUME_MAX, and verify free margin before dispatching the order. Before writing or auditing your EA's sizing inputs, cross-check manual numbers with our interactive Forex Lot Size Calculator and Pip Value Calculator.
Frequently Asked Questions
What risk per trade makes sense for an Expert Advisor under prop rules?
Many systematic traders calibrate individual trade risk between 0.25% and 0.50% of nominal account balance when operating under 5% daily and 8%–10% total drawdown limits. Because your true usable capital is the drawdown budget rather than the nominal balance, risking 0.50% actually represents 5% of a 10% total loss limit on each position.
Why can an EA breach a daily loss limit even when every trade has a stop-loss?
Daily loss rules track live floating equity (including unrealized losses, broker commissions, and overnight swaps) against a server-time snapshot rather than closed balance alone. Multiple correlated pairs hitting stops simultaneously, rollover spread widening, triple Wednesday swaps, or slippage during macro releases can all push total equity below the daily threshold before individual stop orders fill.
How does intraday trailing equity drawdown catch traders off guard?
Under an intraday equity trailing rule, the maximum loss floor moves upward in real time with your peak unrealized profit. If an EA floats +$3,000 in profit on a $100,000 account with a $5,000 trailing allowance, the breach floor shifts up to $98,000—so a subsequent reversal that closes at -$500 leaves only $1,500 of remaining room instead of $4,500.
Should an EA equity guard monitor its own MagicNumber or the full account?
For daily and overall drawdown protection, the equity guard must monitor the entire trading account using AccountInfoDouble(ACCOUNT_EQUITY) and close all open symbols and pending orders on breach. Prop firm risk engines evaluate aggregate account equity regardless of which chart, symbol, or MagicNumber placed each position.
Do all proprietary trading firms permit Expert Advisors?
No. Policies vary widely across firms and account programs. Even firms that permit EAs for personal automated strategies commonly prohibit high-frequency tick scalping, latency arbitrage, reverse/group hedging across accounts, and identical third-party copy-trading bots. Always read the firm's current Terms of Service before running any automated script.
How should an EA compute lot size when stop-loss distance changes with ATR?
Compute lot size dynamically before every entry by dividing your fixed currency risk budget by the product of stop-loss distance in pips and pip value per standard lot, then rounding down (MathFloor) to the broker's volume step (typically 0.01 lots). Rounding down ensures minor step discretization never exceeds your intended percentage risk.
Related Calculators, Risk Policies & EA Guides
Lot Size Calculator
Convert account balance, percentage risk, and stop-loss distance into exact standard, mini, and micro lots.
Pip Value Calculator
Verify exact pip values across USD, EUR, GBP, and JPY crosses before setting EA risk parameters.
Forex Backtesting Guide
Stress-test historical max drawdown and consecutive losing streaks with realistic spread modeling.
Automated Forex Trading Guide
Full architecture from VPS execution and broker selection to demo forward-testing checklists.
Full Trading Risk Disclosure
Review FXAlgoLab's educational scope, leverage risks, and non-advisory policies before deploying automated strategies.