Build EAs that respect prop-firm rules
Funded-account challenges are lost on rules more often than on strategy. Add a daily drawdown guard, risk-based position sizing, a lot cap and trading-hour filters to any Expert Advisor, test it on your own data, and export it for MetaTrader 4 or 5.
The rules most challenges have, as blocks
| Challenge rule | Block | What it does |
|---|---|---|
| Maximum daily loss | Daily Drawdown Guard | Closes everything at your limit (if set) and stops trading until the next server day |
| Risk per trade | Risk % Lot Calculator | Sizes each order from a % of equity and its stop loss |
| Maximum position size | Max open lots | Allows new trades only while open volume is below your cap |
| Daily profit target or lock | Daily equity target | Stops trading for the day once equity is up by your target % |
| Trading hours, no weekend holding | Time / Session Filter, Weekday filter, Close Trades | Trade only in your hours and flatten positions before a set time |
| Consistency | Trades today, Once a day | Cap the number of trades per day |
See the block reference for the exact behaviour of each one.
Add the guards to any strategy
Put the guard blocks at the start of your entry logic: when a limit is reached, the flow takes the NO branch and no new order is sent. The same guards work on a strategy you built from scratch, a tested template, or a strategy the AI builder drafted for you.
Check the rules in the backtest
Run the strategy in the backtester with your challenge’s deposit and leverage. The equity curve shows the drawdown from the peak, the monthly view shows the worst months, and the trade list shows exactly when the guard stopped trading. On Studio, Monte Carlo analysis shows how deep the drawdown could have been with the same trades in a different order.
Firms change their rules. Read your firm’s current terms, including what they say about EAs, and set your limits with a safety margin.
Frequently asked questions
How does the daily drawdown guard work?
The Daily Drawdown Guard block compares equity with the balance at the start of the server day. When the loss reaches your limit, it can close every position and then blocks new trades until the next server day. Set the limit a little below your firm's, because firms measure the day and equity in their own way.
Can it limit risk per trade?
Yes. The Risk % Lot Calculator sizes each order from a percentage of equity and the order's stop loss, between your minimum and maximum lot. The Max open lots block stops new trades once the EA's open volume reaches your cap.
Can it avoid trading during news or overnight?
The time blocks keep trading to the hours, weekdays and days of the month you choose, and Close Trades can flatten positions before a set time, for example before the weekend. QuantForge doesn't include a news calendar, so block the times of the events you care about.
Is this endorsed by a prop firm?
No. QuantForge isn't affiliated with any prop firm. Each firm has its own rules, including on EAs and copy trading: check what your firm allows before you run an EA on a funded or challenge account.
Will an EA pass a challenge?
Nobody can promise that. The guards make sure the EA follows the limits you set; whether the strategy makes the target depends on the market. Backtest it on your own data and run it on a demo account first.
Build your first EA today
The free plan includes three projects, backtests on H1 to D1 over a year, MQL4/MQL5 export and the converter.