Prop Firm Drawdown Lock MT5
- Utilities
-
Sergio Marquez Uroz
I'm an algorithmic trader and MQL5 developer. I build the tools I wanted for my own trading and the trading bots I run myself. If you have a question before or after buying, send me a private message: you'll get an answer from the developer, not from a bot. - Version: 1.0
- Activations: 5
Prop Firm Drawdown Lock is a prop firm risk manager for MetaTrader 5: it watches your daily loss limit and your maximum drawdown in real time, shows you on every chart how much you can still lose, and closes everything and locks the account before the limit is breached. One bad day no longer costs you the challenge or the funded account.
Made for traders in a prop firm challenge, a verification or a funded account with FTMO-style rules: a daily loss limit, a maximum drawdown and a profit target. It opens no trades and gives no signals. It is a safety layer that sits on top of your manual trading, your trade copier or any other Expert Advisor in the same terminal.
It cuts before the firm does
A prop firm counts the breach on equity, tick by tick, and the orders that close your positions cost spread and slippage. Closing exactly at the limit is closing too late. Here you decide at what point of the official limit the EA acts, for example at 90 % of the daily loss, and the panel always shows the money you can still lose at the level where the EA will act, not at the level where the account is already gone.
Three numbers, always in sight
A compact panel shows what matters and nothing else: how much you can still lose today, how much you can still lose in total, and how much is left to the profit target. Each number has a colour bar that turns from green to amber to red as the room shrinks. When you have positions open, a fourth line tells you how much would still be free if every stop loss were hit, and a red warning appears if any position has no stop loss.
Works beside your trading panel or your EA
MetaTrader allows one Expert Advisor per chart, so a risk manager usually ends up on a chart you never look at. This one draws its panel on every open chart of the terminal. Put the EA on any spare chart and the panel appears next to your trading panel, your copier or your strategy EA, while the guardian watches the whole account.
A start card: nothing happens until you confirm
On the first run the EA reads the initial deposit from the account history, so it is right even if the account has already traded. It then shows a start card with the account size, the profit target, the daily loss, the maximum drawdown and whether Algo Trading is enabled in the terminal. Until you press ACTIVATE PROTECTION it only watches and warns, so nothing is closed by accident on the day you install it. Your confirmation is saved and the card does not come back.
You choose how it reacts
- Close everything and lock: at the limit it closes all positions, deletes pending orders and keeps closing anything that is opened until the firm's daily reset. Reaching the maximum drawdown locks the account permanently until you lift the lock yourself.
- Lock new trades, keep the open ones: positions that were already open stay under your management; pending orders are deleted and new trades are closed.
- Alert only: the EA never touches the account. It warns on the chart, by push notification and by e-mail, and you decide.
A daily profit target that closes the winning day
Set a daily profit target as a percentage or as money. When the day reaches it the EA can close everything and lock trading until the next reset, or just notify you. The panel shows how much is left to today's target and marks the day as won.
The trading rules it enforces for you
- A stop loss on every position: after a grace period it sets an emergency stop loss, closes the position or just warns, as you prefer.
- Maximum risk per trade: a position that would lose more than your limit if its stop loss were hit is closed, and a pending order that would do the same is deleted.
- Maximum lot size, maximum open positions and maximum trades per day, counted by position, so partial closes are not counted as new trades.
- Consistency rule and minimum trading days counter for firms that apply them.
- Close everything before the weekend and a high-impact news filter based on the MetaTrader economic calendar.
Stop loss guard
Moving a stop loss further away is how a small loss becomes a breach. The EA keeps the last stop loss of every position and warns you the moment one is widened or removed, with the money at risk before and after the change.
The firm's clock, not the broker's
The daily loss limit resets at the firm's midnight, which is rarely your broker's midnight. Choose the firm's time zone, Central Europe for FTMO-style firms, New York, UTC with a fixed offset, or the broker server, and the daily reset follows the firm's daylight saving time even when your broker changes on another date.
Alerts, and a signal for your own EAs
Every event, a lock, a forced close, a rejected trade, an emergency stop loss or a widened stop, reaches you as an alert window in the terminal, a push notification on your phone and an e-mail, each one optional. The EA also publishes a global variable that other Expert Advisors can read before opening a trade: 1 when the account is locked, 0 when it is free, plus the money that is still available until the nearest cut.
Built to survive restarts
The state is saved to a file in the terminal: the equity peak, the base of the day, the locks and your activation. Close MetaTrader, reopen it, and the guardian continues exactly where it was. It runs on a timer every second, so it reacts even when the chart symbol receives no ticks.
A suggested lot size you can trust
The panel suggests a risk per trade and a lot size from the room you have left and the losing streak you want to be able to survive. The lot is calculated with your broker's own contract specifications for the symbol, not from the tick value, which is wrong on gold with many brokers, and it is always rounded down.
Main inputs
- Initial balance (0 = detect from account deposit) — leave it at 0 and the EA takes the first deposit from the account history; write a value only if your firm counts from a different figure.
- Profit target (% of initial balance) — the target of the phase; 10 for a typical challenge, 5 for a typical verification.
- Maximum drawdown (% of initial balance) — the firm's maximum loss; 10 by default.
- Maximum daily loss (% of initial balance) — the firm's daily loss limit; 5 by default.
- Safety cushion: % of the daily limit — at what percentage of the daily limit the EA acts; 80 by default, 90 if you want the full room.
- Safety cushion: % of the maximum drawdown — the same for the maximum drawdown.
- When a limit is hit — close everything and lock, lock new trades and keep the open ones, or alert only.
- Daily profit target (% of initial balance, 0 = off) — closes the winning day, or just tells you, when the day reaches this profit.
- Prop firm time zone (daily reset) — Central Europe, New York, UTC with a fixed offset, or the broker server; the daily reset follows it.
- Drawdown type — static from the initial balance, trailing on the equity peak, or trailing at the end of the day, as your firm defines it.
- Require a stop loss on every position — and what to do when one has none: emergency stop loss, close it or alert only.
- Maximum risk per trade (% of initial balance, 0 = off) — a position that would lose more than this at its stop loss is closed.
- Maximum trades per day (0 = off) — counted by position; partial closes do not count.
- Alert when a stop loss is widened or removed — the stop loss guard.
- Show the panel on every chart — the panel is drawn on every open chart of the terminal, not only where the EA runs.
- Global variable for other EAs (empty = off) — the name of the lock flag that your own Expert Advisors can read.
Frequently asked questions
Does it open trades?
No. It never opens a position and it gives no signals. It only closes, deletes and locks when the limits you set are reached, and it warns you before that.
Can it run next to my trading panel or my strategy EA?
Yes. Attach it to any other chart of the same terminal. It watches the whole account and its panel is drawn on every chart, including the one where your panel or your EA works.
What exactly happens when a limit is reached?
With the default mode it closes every position, deletes every pending order and keeps closing anything opened afterwards until the firm's daily reset. A trade copier that reopens a trade will see it closed again. On the maximum drawdown the lock is permanent until you lift it with an input.
Does it know my firm's rules?
The defaults are the most common rules: 10 % target, 10 % maximum drawdown, 5 % daily loss, static drawdown, Central European time. Compare them with your firm's current rules and adjust the inputs; the start card shows you the resulting figures before anything is activated.
Does it work on a funded account, a one-step challenge or a non-prop account?
Yes. Set the limits you want to respect and, if there is no profit target, leave it high. It is also used by traders who simply want a hard daily loss limit on their own account.
What if I restart MetaTrader?
Everything is saved in a state file: the equity peak, the day base, the locks and your activation. On restart it continues where it was.
Does it work in the Strategy Tester?
Yes, in visual mode, with the panel and the start card. The free demo is a real demo of the whole workflow.
Do I need a VPS?
The EA protects you while the terminal is open. If you trade from a phone or leave positions open, a VPS keeps the guardian running 24 hours a day.
Can it stop my own EA from opening trades?
Yes. It publishes a global variable with the lock state and the free room. Read it in your EA before sending an order: DDL_LOCKED is 1 when the account is locked and 0 when it is free, and DDL_LOCKED_ROOM holds the money still available until the nearest cut.
At what point does it close, at 5 % or before?
Before. You set the safety cushion, for example 90 % of the daily limit, and the panel shows the money left at that level. The cushion covers the spread, the slippage and the time the broker takes to close.
Trading involves risk and can result in the loss of your capital. This tool enforces the limits you configure; always check your firm's current rules and test it on a demo account first.
Compatibility
MetaTrader 5 · any symbol: Forex, gold, indices, crypto · hedging and netting accounts · manual trading, trade copiers and other Expert Advisors.
Support
I answer every message. For any question about installation or settings, write to me through my MQL5 profile. I usually reply within 24 hours.
If Prop Firm Drawdown Lock saves your challenge one day, please leave a review: it is what keeps the tool moving forward.
prop firm risk manager, prop firm EA, drawdown protector, equity protector, daily loss limit, maximum drawdown, daily drawdown, account protection, risk management, FTMO, funded account, prop firm challenge, challenge protector, lockdown, stop loss guard, lot size calculator, news filter, MT5 utility, MetaTrader 5 expert advisor
