MQL5 and EA trading in a prop firm: what’s allowed
Expert Advisors (EAs) written in MQL5 can trade a prop firm challenge for you on MetaTrader 5 — as long as they trade a real strategy inside the risk rules. Here is what Capifront allows, what it bans, and how to build a daily-loss guard into your EA.
The short answer
Yes. EAs, bots and algorithmic trading are allowed on Capifront’s MetaTrader 5 accounts, on every challenge type. What is not allowed is software whose purpose is to exploit the simulation rather than express a market view.
What you can run
- Your own EA or bot that executes your strategy.
- Trade managers, trailing stops, partial-close and position-sizing tools.
- Custom MQL5 indicators and scripts.
- A VPS to keep the EA running, as long as it is not used to hide account sharing, misstate your country or get around restrictions.
What is prohibited
From the trading rules, these are not allowed whether done manually or by an EA:
- Latency or price-feed arbitrage, and tick-scalping that relies on prices not obtainable in a real market.
- EAs that mass-produce orders or copy trades between accounts, and hedging between your account and other accounts.
- Grid, martingale or “all-in” systems used mainly to game the loss limits or the profit distribution.
- Trading only around high-impact news to exploit spread, slippage or gaps.
Make your EA respect the loss limits
Most EA failures in a challenge are rule breaches, not bad entries. Capifront measures the daily limit on equity (including open positions, swaps and commissions) from the equity at 00:00 broker server time, so a guard inside the EA is worth adding. A simple, illustrative version:
input double StartCapital = 10000; // phase starting capital
input double DailyPct = 5.0; // 6.0 on Capifront Pro
input double Buffer = 50; // stop trading this far above the floor
datetime g_day = 0;
double g_dayEquity = 0;
bool CanOpenTrades()
{
datetime today = iTime(_Symbol, PERIOD_D1, 0); // start of the broker day
if(today != g_day) { g_day = today; g_dayEquity = AccountInfoDouble(ACCOUNT_EQUITY); }
double floorLevel = g_dayEquity - StartCapital * DailyPct / 100.0;
return AccountInfoDouble(ACCOUNT_EQUITY) > floorLevel + Buffer;
}
This records equity the first time the EA sees a new broker day, so start it before midnight server time. The firm’s own calculation is what counts — treat the guard as a safety net, and also cap the lot size so one trade cannot reach the overall 10% limit.
Prefer a ready-made version? Capifront Guard is our free MT5 add-on that does this for the whole account: it shows your remaining room, warns early and can close trades before a limit is hit.
Test before you trade the challenge
- Back-test in the MT5 Strategy Tester with realistic spreads, and include the loss limits in your test report.
- Forward-test on a demo for a week to check slippage and weekend behaviour.
- Log every trade and the reason the EA took it — useful if a trade is ever reviewed.
New to the platform? Start with the MT5 prop firm guide.
Capifront accounts are simulated (demo) accounts with virtual funds. Code examples are illustrative and come with no guarantee; no earnings are guaranteed.
Frequently asked questions
Can I use an Expert Advisor in a Capifront challenge?
Yes. EAs and algorithmic trading are allowed on every challenge type, as long as the EA trades a genuine strategy within the trading rules.
Can I run my EA on a VPS?
Yes, as long as the VPS is not used to hide account sharing, misstate your country of residence or get around restrictions.
Are copy-trading EAs allowed?
No. Copying trades between accounts and hedging between accounts are prohibited.
Do I need MQL5 to trade at Capifront?
No. Manual trading on MT5 desktop or mobile is fully supported; EAs are optional.
Ready to test your skills?
Compare every account size, profit target and risk limit before you start.
View challenges →Keep reading
All Capifront accounts are simulated demo accounts using virtual funds. This article is educational and is not financial or investment advice. Trading on margin carries a high level of risk.