Updated 13 October 2026
Risk management in algo trading means writing fixed rules for how much a single trade can lose, how large each position is and when a system should stop. A stop loss caps each trade, position size decides what that cap costs in money, and margin rules decide how much loss the account can carry before positions are closed.
Key facts
- Our ProRealTime algos risk under 2 % of the account per trade and have a win ratio of 69 % (live results page, 1 October 2026).
- Even so, our live account had a largest decline of −23.5 % from February to April 2024, and was back above its old peak in June 2024.
- 14 of 34 months since December 2023 were negative. The worst was −13.9 % in April 2024 (live data per 30 September 2026).
- Under ESMA's rules for retail CFD clients, leverage on major indices and gold is capped at 20:1, and positions are closed when margin falls to 50 % of the requirement.
What is risk management in algo trading?
Risk management in algo trading is the part of the code that decides how much can be lost, not where to enter. The entry rules decide when a system buys or sells. The risk rules decide how big the trade is, where it exits if it is wrong and what happens when several trades go wrong in a row.
In a rule based system these decisions are made before the trade, which removes the temptation to move a stop or double a losing position. It does not remove losing trades, losing months or declines from the peak.
If you want the full path from code to executed order first, read how ProOrder runs automated trading in ProRealTime.
How does a stop loss work in an automated system?
A stop loss is an exit order that closes a position when the price reaches a level set in advance. In an algo it is written into the code and placed together with the entry, so every trade has a defined exit if the market moves the wrong way.
A fixed stop sits at a set distance from the entry price. A trailing stop follows the price when the trade moves in your favour and stays put when it moves against you, which can lock in part of a gain.
A stop loss is not a fixed price for your loss. In a fast market or when a market opens with a gap, the order can be filled at a worse price than the stop level.
How large should each position be?
Position size should follow from how much you accept losing on one trade, not from how much margin the broker allows. The usual way is to divide the amount you risk by the distance to the stop.
An example. With a 100,000 kr account and 1 % risk per trade you accept a loss of 1,000 kr. If the stop is 50 points from the entry, the position can be 20 kr per point. If the stop is 100 points away, it can be 10 kr per point.
Our own ProRealTime algos risk under 2 % of the account per trade, according to our live results page. On the account balance of 218,747 kr at the end of September 2026, 2 % would be about 4,375 kr. How the same logic works with less capital is covered in algo trading with a small account.
| Risk tool | What it limits | Where it is set |
|---|---|---|
| Stop loss | Loss on a single trade, before slippage | In the trading system's code |
| Trailing stop | How much of an open gain can be given back | In the code |
| Position size | What the stop distance costs in money | In the code and in your platform settings |
| Max position size | Orders larger than your limit are ignored | ProOrder settings in ProRealTime |
| Margin close-out | Positions are closed at 50 % of required margin | Broker, under ESMA rules |
| Negative balance protection | A retail account cannot lose more than its balance | Broker, under ESMA rules |
What protects you against volatility?
Volatility is handled through position size and stop distance in the code, and through limits in the platform and at the broker. No single setting removes it.
Inside the system, a common approach is to measure recent price movement and set the stop and size from it, so that a turbulent market gives smaller positions. Some systems also use a filter that skips new entries when movement is extreme.
Outside the system there are hard limits. According to ProRealTime's conditions for automatic trading, the max position size you set takes precedence over the code, and ProOrder can stop a system after repeated rejected orders or when margin is insufficient. When a system is stopped, open positions are closed at market.
The broker adds a third layer. ESMA's measures for retail CFD clients, introduced in 2018 and since applied by national regulators such as Finansinspektionen, cap leverage at 20:1 for major indices and gold and 30:1 for major currency pairs. That means a margin of at least 5 % and 3.3 % of the position value.
What does a drawdown look like in a live account?
A drawdown is the decline from an account's highest value to a later low, and every live account has them.
The figures below come from our live data per 30 September 2026, counted on month end balances. Past results, live or backtested, do not predict future results, and a new decline can be larger than the ones shown here.
| Our ProRealTime live account | Value |
|---|---|
| Start, December 2023 | 35,000 kr |
| End of September 2026, after fees | 218,747 kr (+525 %) |
| Largest decline from peak | −23.5 % (February to April 2024, 106,783 kr to 81,726 kr) |
| Back above that peak | June 2024 |
| Negative months | 14 of 34, average −6.8 % |
| Worst month | −13.9 % (April 2024) |
| Longest losing streak | 4 months (September to December 2025) |
| Below the May 2025 peak of 271,930 kr | −19.6 % at the end of September 2026 |
Risk under 2 % per trade still allowed a −23.5 % decline, because several losing trades can come close together. And the account has been below its May 2025 peak for 16 months. September 2025 was partly an outside event, since IG had major IT problems and our algos largely did not trade after 10 September, according to our live results page.
Does trading several algos spread the risk?
Several algos on different markets can spread risk, but only when they do not all lose at the same time. Our ProRealTime algos trade CFDs on Nasdaq 100, Dow Jones 30, DAX 40, CAC 40, gold and EUR/USD, long and short.
In 2026 to the end of September, Nasdaq M1 made +39,050 kr and Nasdaq M3 pt.1 made +35,277 kr, while six other algos lost a total of 65,692 kr. Together with the remaining positions the account ended at −433 kr for the period. The result per algo and year is listed on A+ Algos in numbers, and all systems are in our ProRealTime algos collection.
FAQ
Does a stop loss limit my loss to an exact amount?
No. A stop loss becomes a market order when the level is reached, and in a fast market or at a gap the fill can be worse than the stop price. The loss per trade is therefore roughly capped, not exactly capped. Position size decides how large that loss is in money, so a sensible size matters as much as where the stop is placed.
How much should I risk per trade?
That depends on your capital and how large a decline you can accept, and we do not give advice on it. Our own algos risk under 2 % per trade, and our live account still fell −23.5 % from February to April 2024. A lower risk per trade gives smaller declines and smaller gains, while a higher one increases both.
Can I lose more than I deposit when trading CFDs?
For retail clients in the EU, ESMA's rules require negative balance protection per account, so your loss is limited to the money in the account. Positions are also closed when margin falls to 50 % of the requirement. You can still lose all the money in the account, which is why position size and margin matter from the first trade.
Should I stop an algo after a losing month?
A losing month on its own says little, since our account had 14 negative months out of 34 and the worst was −13.9 %. Stopping after every loss tends to mean missing the recovery. What can justify a stop is a decline clearly larger than the system has shown before, or a change in the market or the broker connection.
Summary
Risk management in algo trading is a set of rules for stop loss, position size and limits in the platform and at the broker. It keeps single losses small but does not prevent declines, as our own −23.5 % drawdown in 2024 shows. Set the size from the loss you accept, not from the margin you are allowed.
See the results live. Every month since December 2023 we publish the result of our own algos after fees on the live results page. Our most traded algo is Nasdaq M3 for ProRealTime.
Trading CFDs involves high risk and you can lose money. Past results, live or backtested, do not predict future returns.