Guide
How to enforce trading rules inside MetaTrader 5, even with your app closed
Last updated November 21, 2026
A trading rule only protects you if it still works at the moment you would break it. That is why where the rule runs matters as much as what it says.
Three places a rule can live
On paper
A written plan is the start, but it depends on you remembering it when you are tired, angry or chasing a loss.
In a desktop app
An app can refuse an order that breaks a rule. But if you close the app, or place the trade straight from MetaTrader 5 or your phone, the app never sees it.
Inside MetaTrader 5
An Expert Advisor (EA) runs inside the terminal and sees every position on the account, wherever it was opened from. It can close a position that breaks a rule within seconds.
What a good guard does
- Checks the account every few seconds, not only when you trade.
- Closes any position that breaks a rule, including ones opened by hand in MT5.
- Keeps a locked state across a restart of MT5, so restarting does not reset the day.
- Makes a stricter change take effect at once, but makes a looser change wait, so a limit cannot be talked down in a bad moment.
What a guard cannot do
- Act while MetaTrader 5 is closed or the computer is off. Use a VPS for round-the-clock cover.
- Close at a better price than the market gives. In a gap, the close can be worse than the limit.
- Know your firm’s rules unless you enter them. Set your limits a little under the firm’s.
How CandleWarden does it
CandleWarden keeps the rules in two places. The app refuses an order that breaks a rule before it is sent. An Expert Advisor inside MetaTrader 5 reads the same rules, checks every two seconds, and closes a position that breaks one, even one opened straight from MT5 while the app is closed. Restarting MT5 does not reset it. A stricter change applies at once; a looser one waits for the next trading day.
Quick answers
What is an equity protector in MT5?
An Expert Advisor that watches the account and closes positions, or stops new ones, when a limit such as a daily loss or a drawdown is reached. It runs inside MetaTrader 5 itself.
Does an Expert Advisor keep working when my computer is off?
No. An EA runs inside a running MetaTrader 5 terminal. To keep it on around the clock, run MT5 on a computer that stays on, such as a VPS.
Can I trade by hand with a guard EA running?
Yes. A guard EA does not place trades of its own. It only checks the trades that are opened, by you or by anything else, and acts when one breaks a rule.
CandleWarden is a Windows app for MetaTrader 5 that keeps these rules for you: daily loss, news windows, lot size, trades per day and sessions, held by a guard inside MT5 even when the app is closed. Plans start at $19 a month, with a 7-day free trial.