Safety limits and stops: setting them and using them
Every trading robot you build has safety limits inside it, and you can always stop it yourself. How to set the numbers, what happens when a limit is reached, and the three ways to stop a robot.
A limit stops new trades. It cannot stop prices from jumping, so a loss can sometimes go past the limit you set.
Setting the numbers
In the builder, every trading robot has a row called Safety limits. You will click a limit to change its number. A daily loss limit of 2% means the robot stops opening new trades after a 2% loss in one day; a biggest trade size of 1 lot means no trade larger than that is placed.
You can change the numbers, but you cannot delete the limits, and the builder refuses a robot that goes around them. What each limit does is explained on the safety page.
Choose the numbers from your own rules, or from your prop firm's published limits, with room to spare: a firm's 5% daily limit is a hard line, so a robot that stops at 4% leaves room for an open trade to close.
In the builder
The limits every trading robot has
- Daily loss limit, as a share of the account
- Stop loss on every trade
- Biggest trade size, and most trades open at once
- Trades per day, and the wait between trades
- Trading hours, a pause around news, and a weekend close, if you add them
- An account floor, if you add one
What happens when a limit is reached
The robot stops opening new trades. It writes why in the Experts tab and on the chart, and a robot with an email or push block can tell you too. Trades that are already open keep their stop loss and take profit, and the robot keeps managing them: a trailing stop still trails.
A daily limit resets at the time you set, midnight by default, on the clock the robot uses. A trades-per-day limit resets the same way. The spread limit and the trading hours clear by themselves when the spread narrows or the hours begin.
An account floor is different: once the account is at or below the floor, the robot opens no new trades until you decide what to do. If you chose "close its trades" for the floor, it closes them first.
On the chart
What you see
- A line in the Experts tab with the limit and its number
- A message on the chart while the limit holds
- Open trades still managed, with their stops in place
- New trades again after the reset time, or when the limit clears
Each message is explained on the troubleshooting page.
Your own stop button
Every robot that trades has a Stop robot button in the corner of its chart. Press it, then choose:
- Stop new trades: it opens no new trades. Trades already open keep their stops and keep being managed.
- Stop and close its trades: it closes the trades it opened, then stops.
It stays stopped, even after MetaTrader restarts, until you press Resume robot on its chart. The buttons do not show in the Strategy Tester.
Two more ways to stop a robot, from MetaTrader itself:
- Switch off Algo Trading on the toolbar, or press Ctrl+E. Every robot stops opening trades. Open trades stay open, with their stops.
- Right-click the robot's name on the chart and choose Remove. The robot is gone from the chart. Open trades stay open, with their stops, and nothing manages them any more.
On your robot's chart
The buttons, in order
Press Stop robot
Choose Stop new trades or Stop and close its trades. Cancel changes nothing.
To start again, press Resume robot
We cannot stop a robot on your account for you: the robot never contacts our website. These three ways are yours.
A limit for the whole account
The limits above live inside one robot and apply to its own trades. If you also trade by hand, or run more than one robot, the Account Protector watches the whole account: at the loss limit you set, it closes every open trade and deletes every pending order, whoever opened them.
It cannot stop another robot, or you, from opening a new trade. It can only close trades after they open, and price gaps, slippage or a lost connection can take a loss past the limit. The Account Protector, in plain words.
Example robot
Account Protector
- Closes every trade on the account at a 4% loss in one day
- Closes every trade at an 8% total loss
- Closes every trade on Friday evening
- Opens no trades of its own
Its numbers are examples, not any prop firm's rules. Set your own.
More help
Each page takes one part of running a robot.
Install in MetaTrader 5
Copy the file into the Experts folder, put it on a chart and switch Algo Trading on.Test in the Strategy Tester
Run your rules on past prices, read the result, and make the news file some robots need.The account lock
Where to find your account number, how to change accounts, and what the lock does and does not stop.Where robots run
MetaTrader 5 on a computer, the Mac app and a VPS. Not the phone apps. Keep MetaTrader up to date.Troubleshooting
Every message your robot can show on the chart, in plain words, with the fix.
Join the waitlist
We will email you once, when TheTradingRobot opens.
