Skip to content
ViprasolWE SOLVE INFINITYGet started
Back to Blog

Prop Firm EA Rules: Daily Loss, Drawdown, News and Consistency

How a prop firm EA must handle daily loss limits, trailing drawdown, news blackouts and consistency rules, with worked arithmetic and MQL5 guards.

Viprasol Tech Team
17 min read
Updated 2026

Prop Firm EA Rules: Daily Loss, Drawdown, News and Consistency

TLDR

A prop firm EA is an expert advisor built or adapted to trade inside the rule set of a proprietary trading firm evaluation: a daily loss limit, a maximum drawdown that is often trailing, restrictions on trading around news, a consistency rule on how profit is distributed across days, and a list of prohibited behaviors. The strategy inside the EA matters less than whether the EA measures those limits the same way the firm does and stops itself before the firm does. This article explains each rule type precisely, shows the arithmetic with examples, gives MQL5 guard code for the daily loss and news rules, and is honest about what an EA cannot do for you.

What a prop firm actually evaluates

A proprietary trading firm evaluation is a risk management test with a profit target attached. The firm is not primarily asking whether you can make money; it is asking whether you can make a defined amount of money without ever exceeding defined loss thresholds, under conditions the firm can monitor. Every rule is a constraint on the shape of your equity curve.

That framing matters for automation. A profitable EA that occasionally has a bad day of 6 percent will fail an evaluation with a 5 percent daily limit no matter how good its annual return is. A mediocre EA that never has a day worse than 2 percent and grinds slowly to the target can pass. The engineering job is therefore to bound the worst case, not to maximize the average.

Rule sets differ between firms and between account types at the same firm, and they change over time. Everything below describes rule types and uses hypothetical numbers for illustration. Read the specific firm's current terms, and treat any third-party summary, including this one, as a starting point rather than the contract.

Rule type 1: the daily loss limit

The daily loss limit says your account may not lose more than a fixed amount, or a fixed percentage, within one trading day. The three details that break EAs are what the limit is measured against, whether floating losses count, and when the day resets.

Balance-based versus equity-based

Some firms measure the daily loss against the balance at the start of the day. Others measure it against the equity at the start of the day, which includes any floating profit or loss on positions open at the reset. The difference is large if you hold positions overnight: an open position that was up 1,500 USD at midnight raises your starting equity, and if it then goes to breakeven you have "lost" 1,500 USD of the daily budget without closing anything.

Floating losses count

In nearly every rule set, the daily loss is evaluated on equity, meaning unrealized losses count toward the limit in real time. An EA that only tracks closed trades will breach the limit while believing it is fine. The guard must read account equity, not closed profit.

The reset time

Daily limits usually reset at a specific server time, commonly midnight in the server's timezone or at a specified CE(S)T hour. The EA needs the reset time as an input and must recompute the day's starting value at that moment, including any floating P&L if the firm uses equity-based measurement.

Worked arithmetic

Suppose a 100,000 USD evaluation account with a hypothetical 5 percent daily loss limit measured against start-of-day equity. The account starts the day at 101,200 USD equity.

  • Daily loss floor = 101,200 x (1 - 0.05) = 96,140 USD. If equity touches 96,140 at any moment during the day, the account is breached.
  • Daily budget = 101,200 - 96,140 = 5,060 USD.

Now assume the EA risks 1 percent of balance per trade, 1,000 USD, and allows up to three simultaneous positions. Worst case for the open positions is 3,000 USD. If two earlier trades already lost 1,000 USD each (closed), the realized loss for the day is 2,000 USD, and the remaining budget is 3,060 USD. Three new positions at 1,000 USD risk each would be 3,000 USD of additional worst-case loss, leaving a margin of only 60 USD. One tick of slippage past the stops on all three breaches the account.

The correct EA behavior is to compute the remaining daily budget before every entry, subtract the worst-case loss of all currently open positions, and refuse any new trade whose stop-loss risk exceeds a safety fraction of what is left. With a 70 percent safety fraction: remaining budget 3,060, open exposure 0 (the earlier trades were closed), usable = 3,060 x 0.7 = 2,142 USD. Two positions at 1,000 USD are allowed; the third is refused because 3,000 exceeds 2,142. The safety fraction exists because stops are not guaranteed fills.

Rule type 2: maximum drawdown

Maximum drawdown is the total loss allowed over the life of the account. The two variants behave very differently.

Static drawdown

The floor is fixed relative to the initial balance. On a 100,000 USD account with a hypothetical 10 percent static limit, the floor is 90,000 USD forever. Profits raise your cushion above the floor; they do not move the floor.

Trailing drawdown

The floor follows your high-water mark upward. With a hypothetical 10 percent trailing limit, if equity (or, at some firms, closed balance) reaches 104,000 USD, the floor becomes 104,000 x 0.9 = 93,600 USD. If equity then falls back to 95,000 USD you are still inside, but you have only 1,400 USD of room, not the 5,000 USD you would have under a static rule. Some trailing rules stop trailing once the floor reaches the initial balance; others trail indefinitely. Some trail on equity, which means a large open profit that is never realized can still raise the floor.

Why trailing drawdown changes EA design

Under a trailing rule, giving back open profit is as dangerous as taking a loss. Strategies that let winners run with wide trailing stops are penalized because the peak equity raises the floor while the trade is open. An EA for a trailing-drawdown account typically needs tighter profit protection: partial closes at defined R multiples, or a rule that moves the stop to lock in a fraction of the peak unrealized gain. That is a strategy change forced by the rule set, and it must be reflected in the backtest.

Rule type 3: news trading restrictions

Many firms prohibit opening or holding positions within a window around high-impact scheduled releases, for example a few minutes either side of the event, on the currencies affected. Some apply it only to funded accounts, some to evaluations as well, some only to specific instruments. Violations are sometimes handled by voiding the profit from the affected trade, sometimes by failing the account.

The EA needs three pieces: a calendar source, a definition of which events count, and a blackout window. MetaTrader 5 ships a built-in economic calendar accessible from MQL5 through the Calendar functions, which removes the need for an external feed. The firm's definition of "high impact" may not match the terminal's importance flags exactly, so the window should be configurable and conservative, and you should also keep a manual override list for events the firm names explicitly.

The blackout should block new entries and, if the firm prohibits holding, close existing positions before the window opens. Closing a position early to satisfy a news rule is a real cost to the strategy; a backtest that ignores it overstates the result.

Rule type 4: consistency rules

A consistency rule limits how much of your total profit may come from a single day or a single trade. A hypothetical version: no single trading day may account for more than 40 percent of total profit at the time of the payout or pass. The purpose is to exclude one lucky oversized day.

Worked arithmetic

Profit target 10,000 USD. Hypothetical consistency cap 40 percent. Your best day so far is 4,500 USD. At a total profit of exactly 10,000 USD, the best day is 45 percent of the total, which fails the rule. To pass, total profit must satisfy 4,500 / total <= 0.40, so total >= 4,500 / 0.40 = 11,250 USD. You must keep trading until total profit reaches 11,250 USD, with no new day exceeding 40 percent of the running total, before the evaluation can be passed.

For an EA this translates into a daily profit cap. If the EA knows the target and the cap percentage, it can compute the maximum useful profit for the current day and stop opening trades once that figure is reached. In the example, with a 10,000 USD target and a 40 percent cap, the EA should stop trading for the day at 4,000 USD of daily profit, because anything above that only raises the total it has to reach. Note that the cap also means a strategy that produces rare large winning days and many small days is structurally disadvantaged under this rule type, regardless of its overall expectancy.

Rule type 5: prohibited behaviors

Most firms publish a list of strategies and behaviors that are not allowed. Common items include latency or price-feed arbitrage, tick scalping with very short holding times, hedging across accounts, copy trading between accounts at the same firm, and in some cases martingale or grid position sizing. Whether EAs are allowed at all varies: many firms allow them, some require that the EA be your own rather than a commercial product used by many accounts, and some restrict high-frequency behavior by setting a minimum holding time or a maximum number of trades per day.

From an engineering standpoint, two items deserve explicit handling in code:

  • Minimum holding time. If the firm requires positions to be held for some number of seconds, the EA's exit logic must not close a position before that period has elapsed, even if the stop or target is hit. This is a genuine conflict with the risk logic, and the only safe resolution is to size positions so that the worst case during the minimum hold is tolerable.
  • Maximum lot size or leverage. The lot calculator must clamp to the firm's maximum, and the drawdown guard must still hold at that maximum.

Rule types compared: what the EA must track

Rule typeMeasured onWhat the EA must trackMost common EA failure
Daily loss limitEquity, from start-of-day balance or equityStart-of-day reference, reset time, live equity, worst-case open exposureTracking closed P&L only; ignoring floating losses
Static max drawdownEquity against a fixed floorInitial balance, fixed floorMeasuring from balance while the firm measures equity
Trailing max drawdownEquity or balance against a moving floorHigh-water mark, trailing floor, whether it locksLetting open profit raise the floor and then giving it back
News restrictionTrade timestamps versus the calendarEvent list, impact filter, blackout window, affected symbolsNo calendar at all; or a window that is too narrow for the firm's definition
Consistency ruleProfit distribution across days or tradesPer-day profit history, running total, cap percentageLetting a single day run far past the useful cap
Minimum trading daysCalendar days with at least one tradeDays traded counterHitting the target early and stopping before the minimum is met
Prohibited behaviorsTrade patternHolding time, trade count, lot capScalping exits that violate a minimum hold

MQL5: a daily loss guard

The function below is the core of a daily loss guard. It stores the reference value at the configured reset time, computes the floor, and returns false when equity is at or below the floor. A separate check refuses new trades that would use too much of the remaining budget. It is written to be read, not to be dropped unchanged into production; a production version persists the reference value to a file or global variable so that a terminal restart mid-day does not reset it.

input double DailyLossPct     = 5.0;    // firm's daily loss limit, percent
input int    ResetHourServer  = 0;      // server hour at which the day resets
input bool   UseEquityAtReset = true;   // true: equity-based reference; false: balance-based
input double SafetyFraction   = 0.70;   // share of remaining budget new trades may consume

double g_dayRef = 0.0; // start-of-day reference value int g_dayStamp = -1; // day-of-year of the current reference

void UpdateDailyReference() { MqlDateTime t; TimeToStruct(TimeCurrent(), t); // A new trading day begins at ResetHourServer. Before that hour we still belong to yesterday. int effectiveDay = (t.hour >= ResetHourServer) ? t.day_of_year : t.day_of_year - 1; if(effectiveDay != g_dayStamp) { g_dayStamp = effectiveDay; g_dayRef = UseEquityAtReset ? AccountInfoDouble(ACCOUNT_EQUITY) : AccountInfoDouble(ACCOUNT_BALANCE); } }

double DailyFloor() { return g_dayRef * (1.0 - DailyLossPct / 100.0); } double RemainingBudget() { return AccountInfoDouble(ACCOUNT_EQUITY) - DailyFloor(); }

// Sum of stop-loss risk across open positions, in account currency. double OpenWorstCase() { double total = 0.0; for(int i = PositionsTotal() - 1; i >= 0; i--) { ulong ticket = PositionGetTicket(i); if(ticket == 0 || !PositionSelectByTicket(ticket)) continue; string sym = PositionGetString(POSITION_SYMBOL); double sl = PositionGetDouble(POSITION_SL); if(sl <= 0.0) return DBL_MAX; // a position without a stop has unbounded risk double px = PositionGetDouble(POSITION_PRICE_OPEN); double vol = PositionGetDouble(POSITION_VOLUME); double tick = SymbolInfoDouble(sym, SYMBOL_TRADE_TICK_SIZE); double tval = SymbolInfoDouble(sym, SYMBOL_TRADE_TICK_VALUE); if(tick <= 0.0) return DBL_MAX; total += MathAbs(px - sl) / tick * tval * vol; } return total; }

bool DailyGuardAllowsNewTrade(const double newTradeRisk) { UpdateDailyReference(); double usable = (RemainingBudget() - OpenWorstCase()) * SafetyFraction; return newTradeRisk <= usable; }

Two design points. First, a position with no stop-loss returns DBL_MAX from the worst-case calculation, which blocks all new trades. That is intentional: an EA on a prop account should never hold an unstopped position, and if one exists through a manual intervention or a failed modify, the guard should lock up rather than guess. Second, the guard is a gate in front of the entry function; it does not replace the hard equity check that closes everything if equity touches the floor. Both are needed. The hard check runs on every tick; the gate runs on every entry decision.

MQL5: a news blackout check

The MetaTrader 5 calendar API lets the EA ask whether a relevant event falls inside a window around the current time. The function below returns true if any event of at least the given importance, for either currency of the symbol, is scheduled within the blackout window. It uses CalendarValueHistory over a short time range, which is the documented way to query by time.

input int MinutesBeforeNews = 5;
input int MinutesAfterNews  = 5;
input ENUM_CALENDAR_EVENT_IMPORTANCE MinImportance = CALENDAR_IMPORTANCE_HIGH;

bool InNewsBlackout(const string symbol) { string base = SymbolInfoString(symbol, SYMBOL_CURRENCY_BASE); string quote = SymbolInfoString(symbol, SYMBOL_CURRENCY_PROFIT); datetime now = TimeCurrent(); datetime from = now - MinutesAfterNews * 60; datetime to = now + MinutesBeforeNews * 60;

MqlCalendarValue values[]; int n = CalendarValueHistory(values, from, to); if(n < 0) return true; // calendar unavailable: fail closed, do not trade

for(int i = 0; i < n; i++) { MqlCalendarEvent ev; if(!CalendarEventById(values[i].event_id, ev)) continue; if(ev.importance < MinImportance) continue;

  MqlCalendarCountry country;
  if(!CalendarCountryById(ev.country_id, country)) continue;
  if(country.currency == base || country.currency == quote)
     return true;

} return false; }

The choice to return true when the calendar call fails is a fail-closed design. Missing a trade is cheaper than a rule violation. Note that the terminal calendar is only available on live and demo servers that provide it, and is not available inside the strategy tester in the same form, so backtests need a recorded event list to replay the filter. Our prop firm EA development work includes that replay layer because without it the backtest and the live EA trade different rules.

Strategy styles and rule compatibility

Not every strategy fits inside prop firm constraints. The table summarizes how common styles interact with the rules, as a matter of mechanics rather than performance.

Strategy styleDaily loss limitTrailing drawdownNews rulesConsistency rule
Intraday breakout with fixed stop (for example an opening range breakout)Easy to bound; one or two trades per dayManageable with partial profit takingNeeds a filter around the session's scheduled releasesDepends on how often a large trend day occurs
Trend following with wide trailing stopsFine on entry; floating drawdown on open winners can eat the daily budgetPoor fit: open profit raises the floor, then is given backPositions held through news; often conflicts with holding bansProfit concentrated in few days; often conflicts
Mean reversion with small targetsMany small trades; cumulative daily loss must be capped by a trade counterReasonable fit; small equity swingsEasy to pauseGood fit; profit spread evenly
Grid or martingaleVery poor fit; loss is unbounded by designVery poor fitIrrelevant; the sizing is the problemOften banned outright
Signal-driven via webhook from TradingViewDepends entirely on the receiving EA or bridge enforcing the guardSameSameSame

The last row is a reminder that if signals come from a TradingView alert through a webhook bridge, the rule enforcement has to live on the broker side, in the EA or bridge that places the order. A Pine strategy cannot see account equity on MT5 and cannot enforce a daily limit. The TradingView webhooks article covers how that split is normally built.

What an EA cannot do for you

An EA can enforce the rules more reliably than a tired human. It cannot create an edge, and it cannot change the structure of the evaluation. Specifically:

  • It cannot guarantee a pass. The profit target still has to be reached by a strategy with positive expectancy under the firm's conditions, within the time allowed, without touching any limit. Guards reduce rule violations; they do not produce profit.
  • It cannot see the firm's exact calculation. Firms measure on their own servers, sometimes on a different feed, with their own rounding and timing. An EA guard should be set tighter than the firm's limit, not equal to it. Running a 4 percent internal cap under a 5 percent rule is a common and reasonable margin.
  • It cannot survive a disconnection. If the terminal loses connection, open positions are unguarded. Hard stop-losses on the broker server are mandatory for that reason; an EA that manages stops only in memory is not acceptable on a funded account.
  • It cannot interpret rule changes. When a firm updates its terms, the inputs must be updated by a person. Hard-coding a firm's numbers into the EA is a maintenance trap; every limit should be an input.

Testing an EA against prop firm rules

A standard backtest reports net profit and maximum drawdown. For a prop firm EA you need additional outputs:

  1. Worst single day measured on intraday equity, not on daily close. If the worst day is within a reasonable margin of the daily limit, the parameters are too aggressive.
  2. Trailing drawdown simulation with the firm's exact trailing logic, including whether it trails on equity or balance and whether it locks.
  3. Days to target distribution across many start dates. An evaluation started on a bad week looks very different from one started on a good week; you want the distribution, not one path.
  4. Rule-breach count with the guards disabled, which tells you how often the raw strategy would have failed, and with the guards enabled, which should be zero.
  5. Consistency check computing the largest day as a fraction of the total at the moment the target is first reached.

Monte Carlo reshuffling of the trade sequence is useful here: the same trades in a different order produce different worst days and different trailing floors. The tooling for this is compared in backtesting platforms compared, and the work itself is what our backtesting service delivers. Ongoing adjustments as firms change their rules fall under EA optimization and maintenance.

FAQ

Are EAs allowed on prop firm accounts?

At many firms, yes, with conditions. Common conditions are that the EA is your own or licensed to you, that it does not engage in prohibited behaviors such as latency arbitrage or tick scalping, and that it is not used to copy trades across multiple accounts at the same firm. Check the specific firm's current terms, because policies differ and change.

What is the difference between daily loss and max drawdown?

The daily loss limit resets every day and bounds how much you can lose within one day. The maximum drawdown bounds the total loss over the life of the account, measured from the initial balance (static) or from the highest point reached (trailing). You can breach either one independently.

Does floating loss count toward the daily limit?

In almost every rule set, yes. The limit is evaluated on equity, which includes unrealized P&L on open positions. An EA guard must read account equity continuously, not just closed trade results.

Can an EA built for one prop firm be used at another?

Only if every rule parameter is an input and the measurement method (balance versus equity, static versus trailing, reset time, news definition) is configurable. An EA with a firm's numbers hard-coded needs a code change for each new firm, and is easy to misconfigure.

What does a consistency rule do to an EA?

It caps the useful profit per day as a fraction of the running total and penalizes strategies whose profit comes from a few large days. An EA can enforce a daily profit stop derived from the cap, but a strategy that structurally produces lumpy returns will take longer to pass under this rule than a smoother one.

Is a prop firm EA the same as a regular EA?

The strategy core can be identical. The difference is the guard layer: daily loss gate, drawdown floor, news blackout, consistency cap, lot clamp, minimum hold, and fail-closed behavior when data is missing. That layer is usually as much code as the strategy itself.

Where Viprasol fits

Viprasol builds and adapts expert advisors for prop firm evaluations and funded accounts. The guard layer described here, with every limit as an input, persistent daily references, calendar-based news filtering with a replay layer for backtesting, and the rule-aware test outputs listed above, is the standard scope of our prop firm EA development service. If you already have a strategy in MQL5, Pine or Python, we add the compliance layer around it; new strategies are built under MT5 expert advisor development. A daily loss budget calculator that reproduces the arithmetic in this article is on the tools page. Pricing is on the pricing page, and you can send the firm's rule sheet through the contact form for a scope.

Risk disclaimer: trading forex, futures, CFDs and crypto involves substantial risk of loss; prop firm evaluations carry fees that can be lost in full. This article is educational and is not investment advice; it does not guarantee that any EA will pass any evaluation.

prop firm eaea to pass prop firm challengeprop firm challenge rulesdaily loss limitmax drawdownnews filtermql5expert advisor

External Resources

Share this article:

About the Author

V

Viprasol Tech Team

Custom Software Development Specialists

The Viprasol Tech team specialises in algorithmic trading software, AI agent systems, and SaaS development. With 1000+ projects delivered across MT4/MT5 EAs, fintech platforms, and production AI systems, the team brings deep technical experience to every engagement.

MT4/MT5 EA DevelopmentAI Agent SystemsSaaS DevelopmentAlgorithmic Trading

Ready to Automate Your Trading?

Discuss a custom Expert Advisor with defined strategy rules, risk controls and a testing plan.

Free consultation • No commitment • Response within 24 hours

Viprasol · Trading Software

Need a custom EA or trading bot built?

We build MT4/MT5 Expert Advisors around your strategy, broker and risk requirements. Each project has an agreed scope, testing plan and individual quote.