Prop Firm Consistency Rules in Your MT5 EA — No Code
Can you encode prop firm consistency rules in an EA without coding?
If your strategy already has signals on Step 3, open Step 5 — Risk in AlfaTactix Strategy Builder and configure Account Protection: Max Daily Drawdown (buffer under firm limit), Max Daily Trades, Max Open Positions, Max Consecutive Losses. Pair with Step 4 news/session filters from News Filter — No Code. Export MQL5 → backtest → Demo on the same symbol and leverage as your evaluation.
Disclosure: Not affiliated with any prop firm. Rules change — read official objectives (e.g. FTMO trading objectives) before live. For full drawdown formulas see Prop Firm EA Rules.
What you leave with: a firm-habit → Step 5 mapping table and one question to ask before your next evaluation purchase: would these caps have stopped my worst day last month?
The Moment Your EA Breaks Consistency
Picture this: your backtest curve looks disciplined. You start a funded evaluation. On day nine you take eleven trades because the Asian session kept firing small crosses. Or you have one huge winner that represents 60% of your monthly profit — and the firm's consistency rule flags you anyway.
Consistency failures are often behaviour rules, not bad indicators:
| What happened | What the firm cares about |
|---|---|
| Revenge trading after a loss | Too many entries / uneven risk |
| One lucky trade carries the month | Profit concentration |
| Trading through red-news spikes | Rule violations + slippage |
| Holding five correlated EUR positions | Effective exposure |
Your EA will repeat whatever you allow on every tick. If Step 5 is empty, the robot is honest — it has no concept of "enough for today."
Value of this guide: You map habits you would follow manually onto Account Protection fields the product already exports to MQL5 — without hiring someone to write HistoryDealsTotal() guards from scratch.
Prop Rules vs What You Can Encode in an EA
| Common firm theme | Encode in Strategy Builder? | Where |
|---|---|---|
| Daily loss limit (~5% example) | Yes — buffer | Step 5 Max Daily Drawdown % |
| Max overall loss | Partially | Position sizing + drawdown stop + discipline |
| Max trades per day | Yes | Step 5 Max Daily Trades |
| Max simultaneous positions | Yes | Step 5 Max Open Positions |
| Pause after N losses in a row | Yes | Step 5 Max Consecutive Losses |
| No trading high-impact news | Yes | Step 4 Economic Calendar |
| "Best day < X% of total profit" | Often manual | Not a single toggle — see honest limits below |
| Lot consistency / min hold time | Check firm + export | Step 5 sizing + your process |
Deep MQL5 guard code patterns: Prop Firm EA Rules. Challenge build recipe (signals + filters): FTMO Challenge EA Without Coding.
Account Protection Fields in Strategy Builder
On Step 5 — Risk Management, open Account Protection (Buy/Sell tabs mirror the same idea for directional EAs).
| Field | UI range | Default (product) | What it does in plain English |
|---|---|---|---|
| Max Daily Drawdown | 1 – 50 % | 3 | Stops new trading if today's loss exceeds this % of balance (Pro/Premium tracking) |
| Max Daily Trades | 1 – 100 | 10 | Caps how many deals the EA may open per day |
| Max Open Positions | (UI validated 1+) | 5 | Limits concurrent open trades |
| Max Consecutive Losses | (UI validated) | 3 | Pauses after a streak of losing trades |
The card also shows a risk level chip (Low / Medium / High) from your combination — useful sanity check before export.
Role note: On MetaTrader Basic role, some drawdown fields may be hidden in UI — consistency-focused builds often need Pro/Premium export paths with full Account Protection. Check your plan before relying on daily drawdown in exported code.
Map Firm Habits to Step 5 Settings
Habit 1 — "I won't blow the daily limit"
| Firm PDF says | Builder setting |
|---|---|
| Max daily loss 5% | Max Daily Drawdown: 3–4% (buffer) |
Leave headroom for slippage and spread — programming exactly 5.0% is brittle.
Habit 2 — "I won't overtrade on boredom days"
| Firm PDF / psychology | Builder setting |
|---|---|
| No more than 3–8 intentional trades/day | Max Daily Trades: 5–8 |
Start conservative; raise only if backtest shows too few opportunities.
Habit 3 — "I won't stack correlated risk"
| Risk | Builder setting |
|---|---|
| One EUR idea becomes five positions | Max Open Positions: 1–2 on challenge accounts |
Habit 4 — "I stop after a bad streak"
| Habit | Builder setting |
|---|---|
| Walk away after 3 losses | Max Consecutive Losses: 3 |
Habit 5 — Pair with filters (not Step 5, but consistency-adjacent)
Add Step 4 news filter and session filter — see Advanced MTF & Filters.
Build a Consistency-Aware EA Step by Step
Assume you already have a low-frequency signal (e.g. MA Crossover H1).
- Step 1–3 — Keep your signal; do not add more indicators to "fix" discipline.
- Step 4 — News noEvent + London/NY session if applicable.
- Step 5 — Account Protection — Apply the table above on Buy and Sell risk tabs.
- Step 5 — Position sizing — 0.25%–0.75% risk per trade is a common challenge range (not advice — your math).
- Save → Code Generator → compile → Strategy Tester with realistic spread.
Mini win to feel in Demo: Deliberately set Max Daily Trades = 2, run a volatile week in tester — watch the EA stop opening after the second trade. That is consistency logic working, not a marketing slogan.
Export, Backtest, and Demo on Firm Terms
| Step | Why it matters |
|---|---|
| Tester with Every tick | Overtrading rules react to deal count |
| Same symbol & leverage as challenge | Different margin changes behaviour |
| Demo forward test | Firm dashboards ≠ Strategy Tester equity |
Strategy Tester vs Live · EA Risk Management.
What the Builder Cannot Automate (Honest List)
Be upfront with yourself — and with readers you teach:
- Profit consistency % ("no single day > 30% of total profit") — often evaluated on closed P/L history, not a standard Step 5 toggle. Track in a spreadsheet during Demo.
- Minimum trading days — process rule, not EA logic.
- Firm compliance bots — may flag manual trades, copy trading, or hedging across accounts — outside Strategy Builder scope.
Encoding what you can still removes the most common EA failure mode: unlimited repetition of entries.
Next Steps
- EA Strategy Library — browse all 18+ no-code MT5 playbooks
- FTMO Challenge EA — Without Coding — full challenge-oriented build
- Prop Firm EA Rules — MQL5 guard deep dive
- Test 10 EA Variations in One Day — tune these Step 5 numbers faster
Before you pay for another evaluation: Spend fifteen minutes in the live Strategy Builder demo — no signup. Open Step 5, set Max Daily Trades to the number you wish you had followed last month, and ask: would this have stopped the day that broke my rules? If yes, save the strategy and export when you are ready for a full account.
References: FTMO FAQ objectives · MetaTrader Strategy Tester.