Equity protector EA for MT5: what it does, where it fails, and what to pair it with
Short answer: an equity protector EA watches your account equity and, when it falls to a limit you set, closes every open position. It's the right tool if you want something to act at a loss limit. It runs inside your terminal, so it works only while the terminal, the VPS and the broker connection are up, and positions can still close at a worse price than your limit. A monitor that emails you from outside the terminal covers those gaps.
This guide covers what these EAs do, three ways they fail, how they relate to your prop firm's own hard limits, and where monitoring fits next to them.
What an equity protector EA does
Several are sold on the MQL5 Market. As an example, the product page of Equity Guard says it "closes all trades if equity falls below your limit", with the limit set as a drawdown percentage. Others add a daily loss percentage, a fixed currency amount, deletion of pending orders, or a lock that blocks new trades for the rest of the day.
They all work the same way. On a timer or on every tick, the EA reads ACCOUNT_EQUITY (account equity in the deposit currency, floating profit and loss included), compares it with a threshold, and sends market orders to close the positions. Closing is done with TRADE_ACTION_DEAL requests through OrderSend.
Traders who can't find a ready-made one often hire a developer. The MQL5 freelance board has recurring jobs such as an equity protector for prop firms.
Where an equity protector fails
It lives inside the terminal. If the VPS reboots, the terminal crashes or the broker connection drops, the protector isn't watching. Nothing tells you that it stopped.
The limit is a trigger, not a guarantee. The MQL5 docs state that a successful result from OrderSend "does not mean that the order has been executed". The close request goes to the broker and fills at whatever price is available. In a fast market, slippage and spread can carry equity past your limit before the positions are out. One MQL5 author who writes about daily loss guards recommends setting your internal stop 0.5 to 1% inside the published limit for this reason.
It can watch the wrong number. The same post points out that guards often read balance instead of equity, or draw the day's start line from the local clock instead of the firm's. Balance ignores floating loss. A guard that resets at your PC's midnight is wrong for a firm that resets at another time. After a VPS restart, a guard that doesn't save its day-state starts from a new baseline.
It also doesn't know which EA caused the fall. It closes everything, including EAs that were fine.
What your prop firm enforces itself
A protector is your rule. The firm has its own, and it is the one that can end the account. As of October 2026, FTMO's trading objectives define:
- Maximum Daily Loss: the balance recorded at 00:00 CE(S)T that day, minus 3 to 5% of the initial capital depending on the account type. It applies to equity, defined as "Balance + Open Positions P/L ± Swaps – Commissions", and it recalculates at 00:00 CE(S)T daily.
- Maximum Loss: the highest balance reached, or the initial capital if higher, minus 10% of the initial capital. For 1-Step and 2-Step accounts it recalculates daily at 00:00 CE(S)T.
In both cases, if equity drops below the limit, the rule is considered violated. Other firms differ on the base, the reset time and the penalty, so read your firm's page, not a generic summary.
The firm checks equity against its own clock, and your protector is an extra line inside that limit. Set the protector's limit with a buffer below the firm's, not at it.
The options side by side
| Equity protector EA | Prop firm's hard limit | Position sizing | Monitor with alerts | |
|---|---|---|---|---|
| Acts on its own | Yes, closes positions | Yes, ends or restricts the account | Yes, by limiting size up front | No |
| Works when the terminal is down | No | Yes | Yes, once set | Can tell you the terminal went quiet |
| Protects against slippage past the limit | No | No | Partly, with smaller positions | No |
| Tells you which EA caused the dip | No | No | No | Yes, if it records by magic number |
None of the four replaces the others. Position sizing decides how bad a bad day can get, the protector reacts when one happens, and the firm's limit is the line you must not cross. A monitor warns you before either of the last two comes into play.
Where monitoring fits
A protector does nothing until the limit, then closes everything. It says nothing about the approach, such as equity sitting at 80% of your daily limit at 10:00 with three EAs open. A monitor shows that approach and warns you while you can still choose which EA to cut.
DrawGuard is one. It's a monitor, not a protector: a free EA on one chart sends the account's equity and every open position (symbol, magic number, comment, floating profit) every 60 seconds to a web dashboard. It tracks drawdown the way prop firms measure it, over global, daily, weekly and monthly periods at once, and breaks each dip down by symbol, magic number and comment. Paid plans email you when drawdown crosses a limit you set, for example a warning at 70% and a critical alert at 90%, with presets for common prop firm rules. They also email you when the EA stops sending data, such as after a VPS restart or broker disconnect.
What it does not do: DrawGuard never places, modifies or closes trades, never stops an EA, and doesn't protect an account by itself. If you want positions closed at a limit, you still need a protector EA or your firm's own rules. Its data also starts when the EA connects, and it needs the terminal running, so it depends on the same VPS. The difference is that when that fails, the connectivity alert reaches you. You can look at the live demo with no sign-up.
For why the combined number matters when several EAs share the account, see how to measure combined drawdown. To find which EA caused a dip, see drawdown per EA by magic number.
How to set one up sensibly
- Write down the firm's exact rule: base, reset time, whether it ends the account or only the day.
- Set the protector's limit inside it by a margin that covers a bad fill, in the spirit of the 0.5 to 1% buffer above.
- Make it use equity, not balance, and check what clock it uses for the daily reset.
- Run it on the same VPS as your EAs and test it on a demo account first: open a position, lower the limit, and watch it close.
- Add an alert from outside the terminal, so you know when the protector itself isn't running.
FAQ
What is an equity protector EA?
It's an Expert Advisor that monitors account equity and closes all open positions when equity falls to a limit you set. Some also delete pending orders or block new trades for the rest of the day.
Does an equity protector guarantee I won't breach my prop firm's limit?
No. It sends close orders when the limit is reached, but they fill at the market price, and slippage or a terminal outage can leave equity past the limit. Set it inside the firm's limit with a buffer.
Does DrawGuard work as an equity protector?
No. DrawGuard only monitors and warns. It never closes trades or stops an EA, so pair it with a protector EA or your firm's own rules if you want positions closed at a limit.
Should the protector use balance or equity?
Equity. Balance moves only when trades close, so it misses floating losses. Prop firm loss limits such as FTMO's are measured on equity.