Rule Guard · Guide · 10 minutes
Install Rule Guard in MetaTrader 5
An add-on on one chart that watches your account against the firm's daily and total loss limits, shows the distance to the floor, and warns you before a limit is reached. It never opens a trade.
SHA-256 of KalibreRuleGuard.ex5 (version 0.21): a08d2714a9b1a05e5751059593c6c5247bc5a6738cc85fee5dc97a640697e088
What you need
- MetaTrader 5 on a computer (Windows or Mac), logged in to the account.
- The account size the firm gave you, for example 100,000.
- Optional: the MT5 app on your phone, for push alerts.
Steps
Download the file
Download KalibreRuleGuard.ex5 from the Rule Guard page.
Copy it into MT5
In MetaTrader 5 choose File → Open Data Folder. Open MQL5, then Experts, and copy the file there.
Refresh the Navigator
Open the Navigator (Ctrl+N), right-click Expert Advisors and choose Refresh. KalibreRuleGuard appears in the list.
Put it on a chart
Open any chart, for example EURUSD, and drag Rule Guard onto it. One chart is enough: it watches the whole account.
Set your rules
In the Inputs tab pick your firm's preset, type the Starting capital (your account size; 0 takes the first deposit), keep the safety margin at 0.5 and the mode at Watch. Click OK.
Check the panel
The panel at the top left shows the floor, your equity, the distance to the floor and the state. Compare the preset with your own account's rules.
Turn on phone alerts
In the MT5 phone app, find your MetaQuotes ID under Settings, then Messages. On the computer choose Tools → Options → Notifications, tick push notifications and type the ID.
What you will see
- The daily and total floor, worked out the way the preset's firm does.
- A warning at twice the safety margin: do not open new trades.
- A lock at one safety margin, until the day resets.
- Alerts on screen, as sound and on your phone.
Good to know
- Rule Guard works only while MT5 is open. For a 24-hour watch, run MT5 on a VPS.
- It cannot stop an order you place by hand. In Protect mode it closes every open position and deletes pending orders at the lock; this needs Algo Trading on, and on a real-money account the input Protect on a real account: I accept this.
- Closing happens at market price. Slippage and gaps can take the account past a limit.
- Check that your firm allows a risk add-on on the account. Firm rules change; the preset shows the date it was taken.
Optional: your personal rules
Rule Guard 0.20 also keeps the rules you set for yourself: stop after N losses a day, at most N trades a day, a pause after a loss, no bigger lot after a loss, a daily loss limit and a max lot. In Watch mode it warns when one is broken; in Protect mode it closes the new position that breaks it. Rule Guard 0.21 also warns when a trade opens while the spread is several times its usual level (InpWideSpreadX; 3 in the downloaded settings); it never closes a position for that.
Find your rules
In Trade Analytics, open Your personal rules. Each rule shows what it would have changed on your own trades. Tick the ones you want.
Download the settings
Click Download Rule Guard settings. You get KalibreRuleGuard-rules.set.
Load them in MT5
Drag Rule Guard onto a chart, open the Inputs tab, press Load and choose the file. Check the values and click OK.
See how you kept them
Back in Trade Analytics, click Save as my rules. The next history you drop shows each rule, how often it was broken and what breaking it cost.
Questions: markets@kalibrefin.com. Kalibre is software and does not give investment advice. Risk disclosure