A small, free MetaTrader 5 utility with one job: when your daily loss limit is reached, it closes your positions, deletes pending orders and keeps the day locked until the next daily reset (broker server time). Floating P/L is included, and the lock survives a restart.
On the MQL5 Market it is listed as “Spectar Daily Loss Limiter” — the same tool, installed directly inside MetaTrader 5.
How it works
At the daily reset (broker server midnight by default) it stores the start-of-day value: the start-of-day balance, or the higher of start-of-day balance and equity.
On every tick, every trade event and once per second it calculates today’s loss: start value minus current equity (floating P/L included), or closed P/L only if you prefer.
When today’s loss reaches your limit minus a small safety buffer, the day locks: open positions are closed (all symbols, or only one magic number), pending orders are deleted, and the lock is saved in the terminal.
While the day is locked, any new position is closed immediately and any new pending order is deleted.
The lock lifts automatically at the next daily reset.
An on-chart panel shows the start value, today’s loss, the limit, the room left, the status (OK / LOCKED) and the next reset time.
Install in 1 minute
In MetaTrader 5 open File → Open Data Folder, then the folder MQL5\Experts.
Copy SpectarDailyLossLockLite.ex5 into that folder.
In the Navigator panel right-click Expert Advisors → Refresh.
Drag the EA onto one chart (any symbol — it watches all of them), set your limit in the Inputs tab and click OK.
Make sure Algo Trading is switched on in the toolbar. The panel warns you if it is off.
Main settings
Daily loss limit in money and/or % of the base (default 3 %; when both are set, the stricter one is used).
Safety buffer: acts slightly before the limit to leave room for slippage (default 0.10 %).
Day reset hour in broker server time (0 = server midnight).
Include floating P/L (prop-firm style) or closed P/L only.
Magic filter: 0 = all positions and orders on all symbols, or only one EA’s magic number.
Deposits and withdrawals made today are not counted as profit or loss (option).
Hedging and netting accounts. No DLLs, no web requests, no hard-coded symbol.
Please read: what this tool cannot do
It cannot physically block manual trading. MetaTrader 5 does not let an Expert Advisor disable the trade buttons. While locked, the EA closes new positions as soon as it sees them (normally within a fraction of a second, at most about 1 second). Each such trade can still cost spread, commission and slippage.
It only works while it is running. The terminal must be open and connected, the EA attached to a chart and Algo Trading enabled. If the PC, terminal or connection is down, nothing is enforced.
Closing is not guaranteed at your exact limit. Slippage, gaps, low liquidity or a closed market can make the final loss larger than the limit.
It does not guarantee that you pass any evaluation or follow any firm’s rules. Each firm defines daily loss in its own way — check your rules and set the inputs to match, ideally a bit stricter.
It does not trade, gives no signals and makes no profit. It is a discipline and risk-control tool only.
Want more than a lock?
Spectar FX Gold is our full MT5 tool for XAUUSD on your own account — the rules run within numbers you set, with a daily stop that locks the day. You can try MANUAL free for 8 days. See plans · Free daily loss calculator
Not financial advice. Trading involves risk. This utility is provided free of charge and as is; your account’s own rules and figures always take precedence.