How to Design an EA That Survives Prop Firm Rules
TL;DR: Most retail EAs are built to maximise returns without any hard risk guardrails, which puts them on a collision course with prop firm rules from the moment they go live. This guide breaks down the specific rule categories that kill funded accounts and shows you how to architect an EA that respects each one without gutting its edge.**
Why Most Retail EAs Bust Prop Rules in Week One
A retail EA is usually designed with one constraint in mind: do not blow the account. Prop firms add a second layer of constraints that are completely different in character. They are not about protecting the account from total ruin over months. They are about hard daily limits, specific exposure windows, and event-based restrictions that can trigger a rule breach on a single bad session even when the account equity is perfectly healthy.
Here is the pattern that repeats constantly. A trader runs a grid or martingale EA that has survived three years of live trading on a personal account. They load it on a prop challenge. By Wednesday of the first week, they breach the daily drawdown limit because the EA averaged into a losing position the way it always does, and the drawdown was measured against the starting day balance, not the current equity low. Account closed. Fee lost.
The EA was not broken. It was simply built for a different ruleset.
Understanding what prop firms actually measure, and when they measure it, is the foundation of every design decision that follows.
Understanding What Prop Firms Actually Measure
Before writing a single line of EA logic, you need to read the rulebook of your target firm with a legal mindset, not a trading mindset. The specific numbers vary between firms, but the rule categories are consistent.
Daily Drawdown: Balance-Based vs. Equity-Based
This is the most commonly misunderstood rule. Most firms impose a daily drawdown limit of somewhere between 4% and 6%. The question that matters is: what is the starting reference point?
Some firms calculate it from the balance at the start of the trading day. Others calculate it from the highest equity point reached that day. These two methods produce completely different breach scenarios for an EA running open trades.
If the firm uses highest intraday equity as the reference, an EA that opened a trade, ran it to a profit, and then saw it retrace can breach the daily rule even though it ends the day positive. The EA peaked at a certain equity, the market pulled back, and the distance from that peak to current equity crossed the daily limit. This catches averaging strategies and trend-followers that let winners run.
Your EA must know which method applies and track the correct reference point in real time.
Maximum Overall Drawdown
This is the account-level limit, typically somewhere between 8% and 12% from the initial balance or peak balance depending on the firm. Breaching this ends the account permanently regardless of current performance.
An EA needs a hard equity stop that fires before this level is approached, not at it. Building in a buffer of at least 1% to 2% is standard. If the firm's limit is 10%, the EA should flatten all positions and halt when drawdown reaches 8%.
Profit Targets and Time Requirements
Some firms require a minimum number of trading days before passing. An EA that reaches the profit target in two aggressive sessions may still fail if the minimum active trading days requirement is not met. This is rarely a dealbreaker but it needs to be accounted for in how the EA manages its pace.
How to Handle Daily Drawdown Caps Inside EA Logic
This is the most technical section and also the most important. Getting this wrong is the primary reason funded accounts get closed.
Step One: Determine the Day's Reference Equity
At the start of each trading day (or session open, depending on the firm's timezone definition), record the reference balance or equity. Store it in a persistent variable so it survives EA restarts. Many EAs skip this and recalculate it at every tick from the current session, which introduces logic errors.
If the firm uses highest intraday equity, you need a running maximum that updates every tick and never resets downward within the same day.
Step Two: Calculate Real-Time Drawdown Continuously
Every tick, calculate the current drawdown from the reference point:
current_dd = (reference_equity - current_equity) / reference_equity * 100
This needs to include floating losses from all open positions, not just closed trade history. Most basic EAs only track realised P&L, which is completely blind to open drawdown until positions close.
Step Three: Define Threshold Levels and Responses
Do not use a single threshold that fires at the limit. Use a tiered approach:
- Warning level (e.g., 60% of the daily limit reached): Prevent any new trades from opening. Let existing trades run.
- Reduction level (e.g., 80% of the daily limit): Close the most exposed positions, reduce overall lot size.
- Hard stop (e.g., 90-95% of the daily limit): Flatten everything. Stop all new trade logic for the rest of the day.
The hard stop should never be the daily limit itself. Always leave a buffer for slippage on close orders.
building a custom drawdown monitor for MetaTrader
Weekend Exposure: The Rule Most Traders Ignore Until It Costs Them
Most prop firms prohibit holding positions over the weekend. Some allow it but charge a swap condition that makes it impractical. A smaller number have no restriction. You need to know which category your target firm falls into before deployment.
For firms with a hard no-weekend-holding rule, your EA needs a session-aware closing mechanism. This means:
- Identifying the broker's server time offset from UTC
- Calculating the exact server time that corresponds to Friday market close (typically 23:00 server time on a UTC+2 broker, but verify this)
- Closing all positions and cancelling all pending orders before that time, with enough buffer to handle execution delays
The buffer matters. If you schedule a close at 23:00 and the broker is under load, orders might not fill until 23:01 or later. Set your close trigger 5 to 10 minutes before the actual session end.
Some EAs handle this by checking a flag every tick during the last 15 minutes of Friday. That works but is computationally noisy. A cleaner approach uses a scheduled event that fires once, closes everything, and disables the EA until Monday's open.
Also account for timezone shifts during daylight saving time transitions, which affect server-to-local time mapping and can shift effective close times by an hour. This catches many European and US traders who assume a fixed offset year-round.
Position Sizing Inside Prop Firm Constraints
Retail EA position sizing logic typically uses one of three approaches: fixed lot, percentage of balance, or volatility-based sizing. All three need modification for prop firm use.
The Core Problem with Standard Risk Percent Sizing
A standard 1% risk per trade sounds conservative. But if the EA can have five simultaneous open positions (which many trend or multi-pair EAs do), total exposure at any point is 5% of balance. That is already a significant portion of a typical daily drawdown limit, with no room for adverse price movement on open trades before the daily cap is hit.
Prop firm position sizing needs to think in terms of total portfolio heat, not individual trade risk.
Portfolio Heat as a Sizing Framework
Define a maximum portfolio heat: the total percentage of account balance that can be at risk across all open positions simultaneously. A workable target for a 5% daily drawdown limit is keeping total heat below 2% to 2.5% at any moment. This leaves room for trades to move against you before the drawdown mechanism triggers.
Calculate each trade's risk contribution as the distance from entry to stop loss multiplied by lot size and pip value, then sum it across all open positions. Every time a new trade is about to open, the EA checks whether adding that trade's risk to the current total would exceed the portfolio heat limit. If yes, the trade does not open.
This also means that if the market is volatile and stops are wide, position sizes shrink automatically, which is exactly the right behaviour during high-risk sessions.
position sizing calculators for MetaTrader EAs
News Event Handling
Some prop firms explicitly prohibit trading during high-impact news events. Others have no such restriction but leave traders exposed to the kind of violent price action that can blow through a daily drawdown cap in seconds.
Even if your target firm does not ban news trading, building news awareness into an EA is good practice for prop firm survival.
What "News Restriction" Usually Means
A typical restriction bans opening new positions within a window before and after scheduled high-impact events, often 2 to 5 minutes on each side. It rarely requires closing existing positions, though some firms do require this. Read the specific language carefully.
Implementing a News Filter
The most practical approach for an MT4 or MT5 EA is to use an economic calendar API or a pre-loaded news schedule that the EA reads at startup. The EA checks the upcoming schedule at each new bar and sets a flag that blocks new order logic during the restricted window.
Building the calendar integration from scratch is substantial work. A more practical approach is to use a dedicated news filter indicator that exposes a buffer or global variable the EA can read. This separates the concerns cleanly.
For pairs particularly sensitive to news (USD, EUR, GBP majors), consider widening the pre-event blackout window beyond the firm's minimum requirement. Slippage and spread widening often start before the official event time.
What Do Prop Firms Actually Check When Reviewing Accounts?
This is a question traders ask constantly, and the answer depends on the firm. However, most prop firms that do manual reviews look for consistent patterns of:
- Trades that appear to exploit technical latency (broker arbitrage, price feed discrepancies)
- Consistent news spike trading that captures initial volatility before spreads widen
- Martingale or grid structures that show exponentially increasing lot sizes
- Weekend holding even once
- Identical trade timing across multiple accounts (suggesting account copying at scale)
Firms that are purely rules-based and automated only check the quantitative thresholds: daily drawdown, maximum drawdown, profit target, minimum trading days. If you pass those numbers, you pass.
Either way, building an EA that genuinely respects the rules is cleaner than trying to map the boundary of what reviewers notice.
Can You Trade During News Events on FTMO and Similar Firms?
This is a common PAA question and the answer is firm-specific. FTMO's published rules, as of this writing, do not prohibit news trading by default. However, they do prohibit exploiting pricing errors or delays, which can include trades that appear to systematically front-run major releases.
The safest position: add a news filter anyway. If your EA's edge genuinely comes from a real market dynamic rather than a technical exploit, a 10-minute news blackout per event will cost you very little in expected value and eliminate a category of risk entirely.
FTMO compliant EA checklist for MetaTrader
FAQ
Q: What is the most common reason EAs fail prop firm challenges?
A: Breaching the daily drawdown limit through floating losses on open positions. Most EAs are not designed to track drawdown from a daily reference point in real time, so they keep adding to losing trades the way they always do, and the cumulative floating loss crosses the daily threshold before any position closes.
Q: Can I use a martingale EA on a prop firm account?
A: Most prop firms do not explicitly ban martingale strategies by name, but the structure of martingale (increasing lot sizes on losses) creates rapid drawdown acceleration that is extremely difficult to keep within daily and maximum drawdown limits during a losing streak. In practice, a standard martingale EA will eventually produce a session that breaches the daily cap. Modified martingale with very conservative multipliers and hard position limits can work, but it is building on a fragile foundation.
Q: How do I handle daily drawdown when the firm uses a floating balance reference?
A: You need to track peak equity from the start of each trading day and update it in real time. Your drawdown calculation should always be from that peak, not from the session open balance. Build this tracking into a persistent variable that survives EA restarts during the same trading day.
Q: Do I need different EA settings for the challenge phase versus the funded phase?
A: Often yes. Challenge phases typically have a profit target to hit within a time window, which might justify slightly more aggressive sizing. Funded phases usually have no time limit but the same drawdown rules, which argues for more conservative sizing since there is no upside to rushing. Many traders maintain two parameter sets and switch at the start of the funded phase.
Q: What pairs should I avoid trading with an EA on a prop firm account?
A: Exotic pairs with wide spreads and thin liquidity create unpredictable slippage that can spike drawdown unexpectedly. JPY pairs around the Tokyo to London transition and GBP pairs during UK-specific events show elevated volatility that can trigger daily drawdown limits quickly. This is not a universal rule but if your EA performs consistently on major EUR and USD pairs, there is limited reason to add exotic exposure that introduces new risk factors in a prop environment.
The Bottom Line
Designing a prop firm safe EA is not about building a different strategy. It is about adding a compliance layer on top of whatever strategy you already have. That layer needs to track daily drawdown from the correct reference point in real time, enforce portfolio heat limits rather than per-trade risk limits, handle weekend close events with adequate buffer, and optionally block trades around high-impact news.
The EAs that pass challenges and survive funded phases are not necessarily the most profitable ones. They are the ones that were explicitly designed to operate within the rule structure of the environment they are deployed in. Build for the rules first, then optimise for returns within those constraints.