Account Guard Daily Limit
- ユーティリティ
-
Ali Akbar
Hi, I'm Ali. 24 years old, trading for around 5 years, and developing MQL5/MQL4 tools. I mainly work on automating manual strategies, fixing broken EA logic, and building clean indicators. I care more about clean architecture and proper risk management than over-complicated code. Always down to talk - バージョン: 1.0
Account Guard Daily Limit is the free version of Account Guard. It watches the whole account and enforces two rules: a daily loss limit and a maximum drawdown. It opens no trades of its own. It works for manual trades and for any EA on the account.
The panel shows the state, the day result against the limit, and how much room is left above the drawdown floor.
The two rules
- Daily loss limit in percent of the initial balance. When it is hit, every position and pending order is closed. Any trade opened later that day is closed too. The lock ends with the next trading day.
- Static maximum drawdown in percent of the initial balance. When it is hit, the account stays locked, also after a restart. To clear the lock, set "Reset the lock at start" to true once and reattach the guard.
Why it counts the day correctly
- The day starts at your firm's real time. You choose midnight Central Europe, the New York close at 17:00, server midnight, or midnight UTC. Daylight saving time is taken into account, so the reset does not move by an hour twice a year.
- Deposits and withdrawals are not profit or loss. Money moved after the start is left out of both rules.
- A lock survives a restart. It is saved to a file, so closing the terminal does not clear it.
Inputs
| Input | Default | What it does |
|---|---|---|
| Daily loss limit, percent of the initial balance | 5 | 0 turns the rule off. |
| Maximum drawdown, percent of the initial balance | 10 | 0 turns the rule off. |
| Trading day starts at | Midnight Central Europe | Pick the day start your firm uses. |
| Server standard offset from UTC, hours | 2 | The server's offset in winter. |
| Server daylight saving rule | US | The rule your broker's server follows. |
| Reset the lock at start | false | Set to true once to clear a drawdown lock, then back to false. |
Setup
- Attach it to one chart of the account. Any symbol works.
- Set the two limits.
- Choose the day start, then enter the server's UTC offset and daylight saving rule.
- Allow Algo Trading and keep the terminal running, because the guard can only act while it runs.
Limits you should know
- It cannot stop another EA from sending an order, because Market products cannot use DLLs. It closes the trade right after it opens instead, and that trade still costs a spread.
- A price gap on news can push the loss past the limit before the guard can act. Set your limit with a buffer.
- Daylight saving rules cover the US and the EU only.
- It was tested on hedging accounts. Netting accounts were not tested yet.
What the full version adds
The full version, Account Guard, adds a money limit next to the percent limit, a choice of day base, and a trailing drawdown. It also has daily and account profit targets, a margin level rule, and open risk warnings. You also get alerts to your phone and email, panel buttons (Close all, Lock, Reset lock), and an option to close the charts of other EAs when a lock starts.
