Consistency Rule Pacer
A consistency rule caps how much of an account's total profit any single trading day is allowed to represent - commonly somewhere around 30 to 50 percent, though the exact figure and even whether it applies at all varies by programme. Pass the overall profit target and still fail the rule because one exceptional day did too much of the work, and a payout can be denied even though the account is genuinely up. This EA computes, on every recalculation, the account's total accumulated profit since the evaluation started and today's own profit as a share of that total - deliberately including today's open floating P/L, not only closed trades, because a trader deciding whether to bank more profit or stop for the day needs to know where the day stands right now. When that share crosses a configurable warning buffer below the stated limit it alerts once; when it crosses the limit itself it alerts again with a plain "stop trading for today" message, because taking more profit at that point makes the evaluation less likely to pass, not more. It places no orders and cannot stop a trader (or another EA) from continuing to trade past the warning - it is a pacing instrument, not an enforcement mechanism, and says so on the chart. Notes and limitations - This is a pacing and warning tool, not an enforcement mechanism. It cannot close positions, block new trades, or stop a trader from continuing past a breach alert. - The exact consistency rule - whether it exists at all, what percentage applies, and whether it is measured against closed profit only or includes floating P/L - varies by firm and programme and changes without notice. Verify InpConsistencyPercent against your own agreement before relying on this tool's warnings. - Today's profit intentionally includes open floating P/L. A firm that measures the rule against closed profit only will see a different (usually lower, since it excludes still-open gains) number than this tool reports intraday; the two converge once all of today's trades are closed. - Manual deposits or withdrawals shift the account's balance and equity but are not trading profit - this tool does not attempt to separate them out of the totals it reads. - The start date and balance are captured once per account into persisted terminal GlobalVariables and reused across restarts unless overridden by input - the same pattern used by other evaluation-tracking tools in this catalogue, so mismatched inputs across tools on one terminal can disagree if set inconsistently.
Expert advisor · MT5 · v1.0 · Free
About Consistency Rule Pacer
Consistency Rule Pacer is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 6 settings, such as Consistency percent, Warn buffer percent and Eval start date. MQL source code included.
Files in the download: ConsistencyRulePacer.ex5, ConsistencyRulePacer.mq5, ConsistencyRulePacer.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Consistency percent | 40.0 | Hard limit: today's profit as a percent of total accumulated profit |
| Warn buffer percent | 10.0 | Warn this many percentage points before the hard limit is reached |
| Eval start date | 0 | Evaluation start date override; 0 = capture automatically on first run |
| Eval start balance | 0.0 | Evaluation start balance override; 0 = capture automatically on first run |
| Magic filter | -1 | Only count trades with this magic number, -1 = every magic number |
| Recalc seconds | 30 | Minimum seconds between recalculations |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Alerts · MT5 Expert Advisor · MQL5 Source Code