Consistency Rule Monitor
The consistency rule is easy to satisfy on any single day and easy to break without noticing over a full evaluation period: it caps how much of the account's TOTAL profit any one day is allowed to represent, not how large a single day's profit is on its own. One great day is fine when the rest of the month has kept pace with it; the same day becomes a problem the moment it dwarfs everything else put together, and by then the trader has often already requested the payout. This monitor rebuilds a realised-profit bucket for every calendar day in a lookback window from closed history, sums them into a total, and finds the day with the largest share of that total. Today's still-open floating profit is folded into today's bucket by default, so a large floating winner already shows as a threat to the rule before it is ever closed - waiting for the close to check would defeat the point of a live monitor. The share is only evaluated while total profit is positive; the rule has no meaning against a net loss, and showing a percentage in that state would be misleading rather than informative. Notes and limitations Read-only monitor - it never places or closes an order. Some programmes measure the consistency share differently (for example, against the evaluation period's profit target rather than total realised profit to date); confirm your own programme's exact wording before relying on this figure. It only sees this terminal's own account history.
Expert advisor · MT4 · v1.0 · Free
About Consistency Rule Monitor
Consistency Rule Monitor is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 5 settings, such as Max single day percent, Lookback days and Magic filter. MQL source code included.
Files in the download: ConsistencyRuleMonitor.ex4, ConsistencyRuleMonitor.mq4, ConsistencyRuleMonitor.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Max single day percent | 30.0 | Maximum share of total profit any single day may represent |
| Lookback days | 90 | Calendar days of closed history included in the total |
| Magic filter | -1 | Magic number filter (-1 = every magic number) |
| Current symbol only | false | Restrict to this chart's symbol |
| Include floating today | true | Fold today's open floating profit into today's bucket |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 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 · MT4 Expert Advisor · MQL4 Source Code