Forex Trading Guidelines › Guideline 18

EA Trading Guidelines: 12 Rules for Automated Forex Robots

The rule: an Expert Advisor must obey the same guidelines a disciplined human would — hard stop losses, risk-based position sizing, daily loss shutdown, and a ban on martingale logic. Most retail EAs fail because they encode gambling, not guidelines.

The 12 EA Guidelines

#EA ruleWhy it matters
1Hard stop loss on every positionNo SL = one bad candle can blow the account. The EA must refuse to trade without a stop.
2Risk-based sizing (0.5-2%)Lots must be computed from equity and stop distance — never fixed lots that become oversized as equity falls.
3Daily loss shutdownClose all positions and stop trading for the day at a 3-5% daily loss (the 3-5-7 rule, automated).
4Max consecutive losses pauseAfter N losing trades in a row, pause until the next day — markets regimes can flip a losing streak into a blow-up.
5No martingale / grid / averagingPosition doubling is a countdown to zero. If the EA "needs" it, the edge does not exist.
6News blackout filterNo new positions 30 min before/after high-impact events (Guideline 9). Spreads explode at releases.
7Max spread checkSkip the trade if spread exceeds a multiple of the average — slippage and spread widen kill scalping edges.
8Session filterTrade only configured sessions; skip rollover and Friday close windows (Guideline 15).
9Max open positions & correlated exposureCap simultaneous positions and combined exposure (3% open risk) — EURUSD and GBPUSD can act as one trade.
10No Friday / expiry-day holdingFlatten before weekends and expiry when gaps can gap through every stop.
11Forward-test on demo firstMinimum 1-3 months of demo forward-testing after backtest — the 90% rule (Guideline 6) applies to robots too.
12Monitor daily; kill switchA robot is not "set and forget" — review the journal daily and keep a manual kill switch for regime changes.

The Backtest Red Flags

Before trusting any backtest result, check for these classic overfits — they are the reason most backtests fail live:

  • Profit factor above 2.5 over years of data — suspiciously good; retail-quality data + realistic spreads rarely produce this.
  • Zero or tiny slippage assumptions — real execution costs 0.5-2 pips more than backtests show.
  • Curve-fitted parameters — a strategy that only works with 200 EMA and 14 RSI tuned to one historical window.
  • Martingale or grid included — the backtest will show a beautiful curve right up to the vertical drop.
  • Small sample — fewer than 300 trades, or fewer than 3 different market regimes, proves nothing.

Where to Encode These Rules

Use the Free MT4 EA Builder or Free MT5 EA Builder to turn a 9-part strategy (Guideline 11) into an EA, then verify the EA follows all 12 rules above before funding it. For fully custom robots, MT5 EA development services can encode every safeguard.

Build an MT4 EA Build an MT5 EA Print the Rulebook

FAQ

Why do most forex EAs fail?

Most retail EAs fail because they lack risk controls (no stops, fixed oversized lots, martingale), were overfitted to a single backtest window, or were forward-tested for days instead of months. The 12 EA guidelines fix all three.

Is martingale EA trading safe?

No. Martingale doubles size after every loss — the backtest curve looks amazing until the streak that empties the account. It violates guideline 5 above and guideline 14 of the human rulebook.

How long should I test an EA on demo before live?

At least 1-3 months of forward testing across different market conditions, after a backtest on at least 300 trades covering multiple regimes. Then fund small and monitor daily.

What risk settings should my EA use?

0.5-2% risk per trade computed from equity, 3-5% daily loss shutdown, max 3% open exposure, stop loss on every trade, and no size increase after losses. These match the human guidelines and prop-firm rules.

🚀 Invite friends — Earn $5 You both get $5 credit on Go Ad · opencode.ai AI-Powered Coding Agent — Try Free Build apps, fix bugs & ship faster with opencode. Get $5 free credit when you join. × Ad · quo.com QuoPhone — $20 Visa Gift Card Free Sign up to Quo, subscribe 3 months, get a $20 Visa gift card. Atif's referral gift for you. ×