How a daily loss limit lock works on MT5 for prop-firm challenges (free tool)
2 November 2026, 13:14
0
32
Many prop-firm challenges end on the same rule: the daily loss limit. One bad session, a few trades too many after the first loss, and the day is over. We built a small, free MetaTrader 5 utility for exactly that moment. Here we explain how the day is measured, where the reset sits, what a lock can and cannot do, and how to set the free EA up. Rules differ by firm; check yours.
The problem: the day ends before you decide it has
A daily loss limit is a line in money terms. Once today's loss reaches it, the day is breached, and closing the position afterwards does not undo it. The line is crossed by numbers you are not watching while you trade: floating losses on open positions, several positions adding up, a short spike around news.
How the day is measured: balance vs equity
Open the Trade tab in MT5 and look at the bottom line. Balance is the money from closed trades only; it changes when a position is closed, when a swap or commission is charged, or when you deposit or withdraw. Equity is balance plus or minus everything still open: a floating loss lowers it, a floating gain raises it.
A balance-based rule only looks at closed results: a position can sit deep in a floating loss and the rule does not react until you close it. An equity-based rule looks at live equity, tick by tick: the moment open losses plus closed losses for the day reach the limit, the rule is breached, whether or not you have closed anything. Many rule sets for funded and challenge accounts are equity-based. Do not assume; read your own firm's wording.
A worked example (example figures only, not a suggestion for any account): start of day 10,000, example limit 500, so the line sits at 9,500. Trade A closes at a loss of 200: balance and equity 9,800. Trade B is open with a floating loss of 320: balance still 9,800, equity 9,480. Under a balance-based rule nothing is breached; under an equity-based rule the limit was breached when the floating loss on B passed 300. Compare the line with your equity, not your balance.
The starting point and the reset time
Some rule sets take the balance at the start of the day as the starting point. Others take whichever is higher of balance and equity at that moment, so a floating gain held over the reset raises the line you are measured from.
The reset is a count, not an action. On MetaTrader 5 the day usually resets at 00:00 on your broker's server clock, not at your own midnight. Nothing is closed at that moment; an open position carries into the new day with its floating result. The server time is shown at the top of Market Watch (Ctrl+M).
What a lock does, and what it cannot do
The Spectar Daily Loss Limiter watches the account and acts when today's loss reaches the limit you typed in:
1. At the daily reset (server midnight by default) it stores the start-of-day value: balance, or the higher of balance and equity.
2. 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.
3. When today's loss reaches your limit minus a small safety buffer, the day locks: open positions are closed, pending orders are deleted, and the lock is saved in the terminal.
4. While locked, any new position is closed immediately and any new pending order is deleted.
5. The lock lifts 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.
What it 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 a new position as soon as it sees it, normally within a fraction of a second and at most about one second. Each such trade can still cost spread, commission and slippage.
- It only works while it is running: terminal open and connected, EA on a chart, Algo Trading enabled. Otherwise 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.
- It does not guarantee that you pass any evaluation or follow any firm's rules. Set the inputs to match yours, ideally a bit stricter.
- It never opens a trade on a live or demo account, gives no signals and makes no profit.
Settings walkthrough (free EA)
Install: copy the file into MQL5\Experts, refresh Expert Advisors, drag the EA onto one chart of any symbol (it watches the whole account), set your inputs and make sure Algo Trading is on; the panel warns you if it is off.
- Daily loss limit, money and % of base - default 3 %; 0 switches either off; when both are set, the stricter one applies. The default is not a suggestion: the figure is yours to set from your own firm's formula.
- Base for % limit - start-of-day balance, or the higher of balance and equity.
- Safety buffer - the lock acts this far before the limit, as a reserve for slippage (default 0.10 %).
- Day reset hour, SERVER time - 0 to 23; 0 is server midnight.
- Include floating P/L - true measures on equity (prop-firm style); false counts closed trades only.
- Ignore deposits/withdrawals made today; Close all open positions when lock triggers.
- Magic filter - 0 covers every position and order on every symbol, manual trades included; any other value limits the closing to that magic number.
- Max slippage, retries, panel, pop-up alert.
Hedging and netting accounts. No DLLs, no web requests. In the Strategy Tester it opens small demo positions only to demonstrate the lock.
FAQ
Does it count floating losses?
Yes, by default: today's loss is start value minus current equity, so open positions count at once. Set Include floating P/L to false for closed trades only.
What happens at the reset if I am locked?
The lock lifts at the next daily reset and a new start-of-day value is stored.
Can I attach it to several charts?
One chart only; it watches all symbols. One instance per account.
Will it stop me clicking Buy while locked?
No. MT5 does not let an EA disable the trade buttons. The EA closes the new position as soon as it sees it; that trade can still cost spread and slippage.
What limit should I type in?
That is yours to set. Many firms state a daily figure in money or in per cent; read your own firm's wording and set the inputs to match. We set no number for you.
Links
The free EA is on the MQL5 Market as Spectar Daily Loss Limiter: https://www.mql5.com/en/market/product/200369
Spectar FX Gold, our full MT5 service for XAUUSD with a daily stop that locks the day, is at https://spectarfx.com
Not financial advice. Trading leveraged CFDs carries a high risk of losing your entire capital. We are not affiliated with any proprietary trading firm or broker.


