How to set a daily loss limit in MT5 (free tool)

11 October 2026, 10:12
Pitt Petruschke
0
35

MetaTrader 5 has no built-in daily loss limit. You can set a stop loss on each trade, but nothing stops the next trade, the trade from the mobile app, or the EA that keeps going after a bad morning. Daily Loss Limit is a free Expert Advisor that adds one: when equity reaches your limit for the day, it closes everything and locks the account until the next daily reset.

This guide shows the setup in five minutes, explains every setting, and lists what the guard can and cannot do.

1. What happens when the limit is reached

  • At every daily reset Daily Loss Limit records a day reference: the balance at the reset (default), or the higher of balance and equity.
  • Your daily loss line = day reference − limit. With 10,000 and 5 %, the line is 9,500.
  • When equity reaches the line, pending orders are deleted first, then all positions are closed, largest loser first.
  • The account is locked until the next daily reset. Any new position or pending order, from you, the mobile app or any EA, is closed or deleted again.
  • At the reset the lock ends by itself and a new day reference is recorded.

Daily Loss Limit never opens a trade on your account. It watches the whole account, not just the chart it runs on.

2. Setup step by step

  1. Download Daily Loss Limit from the MQL5 Market. It appears under Market in the Navigator.
  2. Switch on Algo Trading in the toolbar.
  3. Open one extra chart (any symbol, for example EURUSD M1) and drag Daily Loss Limit onto it. On the Common tab tick Allow Algo Trading.
  4. On the Inputs tab set your daily loss limit and, if you want one, a daily profit target. Press OK.
  5. Check the panel: the status should say PROTECTED. If it says NOT PROTECTED, Algo Trading is off, the EA may not trade, the broker blocks expert trading, or the terminal is disconnected. TRADING NOT ALLOWED means the account cannot trade (for example, logged in with the investor password).
  6. Keep the terminal running, ideally on a VPS (see section 5).

Use one Daily Loss Limit instance per account. A second copy on another chart of the same terminal shows SECOND INSTANCE - display only and takes over if the first one is removed (or stops responding for 30 s). Don't run it in two terminals on the same account.

3. The settings explained

Daily loss limit

  • Daily loss limit in – Money (account currency) or Percent of the day reference. Default: Percent.
  • Daily loss limit – the size of the limit. Default 5.0. 0 = off. A percentage must be below 100.
  • Day reference – Balance at the daily reset (default) or Higher of balance and equity at the reset. The second option also counts open profit you carried over the reset, so it is stricter. Equity at the reset is only known if the guard processes the reset within 5 minutes of the reset time and no deal has changed the balance since then; otherwise the balance is used and the panel shows rebuilt.
  • Daily reset, server time – HH:MM in your broker's server time, the clock in Market Watch. Default 00:00.

Daily profit target

  • Profit target in and Daily profit target – money or % of the day reference. Default 0 = off. When equity reaches reference + target, everything is closed and the account is locked until the reset.

Protection

  • Warn when this % of the daily limit is used – default 70. One alert and push message per day. 0 = off.
  • While locked: close new positions and delete new pending orders – default on. If you switch it off while locked, the panel says so and closes of new trades that are still queued are cancelled.
  • Max close requests per day – default 300. A budget for the requests that close new trades while locked, so a runaway EA cannot make the guard spam the server. The closes when the line is reached and the CLOSE ALL button are exempt.
  • Max slippage when closing – default 50 points.

Notifications and panel

  • Terminal alert popup (on), push to the MetaTrader mobile app (on; only sent if notifications are enabled under Tools → Options → Notifications), sound (off) and the sound file.
  • Panel X and Y position.

If an input is wrong (for example a reset time of 25:00), the panel shows INPUT ERROR - guard inactive with the reason. Nothing is guarded until you fix it.

4. Reading the panel

  • Status: PROTECTED (green), WARNING (amber), DAILY LOCK until hh:mm (red), TARGET REACHED - LOCK until hh:mm (green), NO LIMIT SET - monitor only (amber), NOT PROTECTED (red), TRADING NOT ALLOWED - guard cannot close (red), SECOND INSTANCE - display only (grey), INPUT ERROR - guard inactive (red).
  • Today P/L = equity − day reference. It includes open positions and today's closed trades.
  • Daily loss: money left before the line, % of the limit used, a bar and the line itself.
  • Next reset: countdown in server time.
  • CLOSE ALL: closes every position and deletes every pending order. Click twice within 5 seconds. It does not lock the account. Closing started with CLOSE ALL continues after the reset.

5. Keep it running: VPS

The guard can only close trades while the terminal runs, is connected and has Algo Trading on. If your PC sleeps, the protection sleeps too. A VPS keeps the terminal online around the clock. More on VPS options for MetaTrader: algoverdict.com/en/vps.

6. FAQ

Does it work with my EA? Yes. It does not touch any EA until a line is reached. Then it closes everything, including that EA's trades, and keeps closing new ones until the reset.

Netting or hedging account? Both are supported.

Can I unlock early? There is no unlock button. You can set the rule that caused the lock to 0 and press OK; the lock then ends. Removing the EA only pauses the protection: attach it again before the reset and the lock is restored, and any positions or pending orders still open are closed again.

What if I restart the terminal? The day reference, the lock and its end time are saved per account in terminal global variables. A restart keeps the lock, and an unfinished lock liquidation continues.

I attached it in the middle of the day. Which reference is used? The balance at the reset time, rebuilt from the trade history: current balance minus the result realised since the reset. Losses made before you attached it still count.

Is a withdrawal counted as a loss? No. Deposits and withdrawals move the day reference by the same amount. Credit is different: adding or removing credit changes equity and can reach the line or the target.

Why are there trades in the Strategy Tester? In the tester, Daily Loss Limit places small demo trades (minimum volume, only while the session is open) so you can watch the panel in visual mode. On a real or demo account it never opens a trade.

Is it tested? Yes, on a RoboForex demo on 9 October 2026 with the final build: the built-in self-test passed 171 of 171 checks, and validator-style runs of the Market build in the Strategy Tester (XAUUSD D1, real ticks; earlier versions also EURUSD H1 and USDJPY M30) produced no error line.

Does it guarantee my loss stops exactly at the line? No. It acts normally on the first tick or timer second after equity crosses the line (if the balance has just changed and the deal is not in the history yet, it waits up to 3 more seconds). Gaps (weekend, news) and slippage can take equity below it, and the broker can reject a close.

7. When the paid Plimsoll is the better tool

Daily Loss Limit is a daily guard with a limit you choose. Prop firms measure differently: their own reset time zones, a max-loss line that can trail your best day, news and weekend rules, consistency caps. If you trade a prop-firm account and want those rules calculated for you, with a safety buffer above the firm's line, a max-loss lock and a breach log, look at Prop Firm Guard Plimsoll. If you only need a hard stop for the day on your own account, Daily Loss Limit is enough.

A longer guide with examples: Daily Loss Limit – guide on AlgoVerdict.

Risk warning: trading leveraged products carries a high risk of loss. A daily loss guard reduces the risk of a large daily loss; it cannot remove it.

Pitt Petruschke (PiP)