Risk management for algo traders
AKQX builds hard limits into every strategy: a maximum leverage cap, fee-aware position sizing, a fee-to-risk breaker, a minimum stop distance, circuit breakers that halt after consecutive losses with a cool-down, a daily loss cap, trailing stops and partial take profit, plus Telegram alerts for operational problems. All of it applies on paper as well as live.
Why does an algorithm need hard limits?
A discretionary trader having a terrible day eventually gets up and walks away. An algorithm does not. It will keep taking the setup it was told to take, at the size it was told to use, for as long as it is running, and it has no idea that the market regime it was built for ended on Tuesday.
That is the actual risk in automated trading, and it is rarely a single catastrophic trade. It is a strategy that kept going: a run of losses that compounds, a position that grew because sizing scaled with equity, a stale data feed producing signals from prices that no longer exist. Every control on this page exists to put a floor under one of those.
What these controls are not. They bound certain failures. They do not make a losing strategy profitable, they cannot prevent loss, and they offer no protection against market gaps, exchange outages or a strategy that was simply wrong. Risk management limits damage; it does not create an edge.
Circuit breakers: stopping a bad run
A circuit breaker halts a strategy when a condition you set is reached, then waits before allowing it to resume. The forms AKQX provides:
- Stop after N consecutive losses. A losing streak is the clearest available signal that current conditions are not the ones a strategy was built for.
- Cool-down period. After a halt the strategy waits rather than re-entering on the next tick. The cool-down length is configurable, because the right pause on a 3-minute strategy is not the right pause on a daily one.
- Daily loss cap. A ceiling on the day's loss, after which the strategy stops until the next session.
- Loss-chain day limits. A cap on how many losing trades a strategy may chain together within a single day, independent of the dates on the calendar.
Each deployed algo reports its state, so a strategy sitting in a cool-down is visible rather than silently idle — which matters, because “nothing is happening” and “it stopped itself an hour ago” look identical until you can see the state.
Position-sizing guards
Sizing is where most automated strategies actually fail, long before their entry logic becomes the problem.
- Maximum leverage cap. A hard ceiling on the leverage any single position may use, regardless of what the strategy would otherwise request.
- Fee-aware sizing. Position size is calculated with estimated trading costs included, rather than sizing against a cost-free ideal and discovering the difference afterwards.
- Fee-to-risk breaker. Refuses a trade where the estimated cost of trading is large next to the risk being taken. This is the guard that catches the tight-stop trap, where a setup's reward-to-risk looks excellent and is entirely consumed by fees.
- Minimum stop distance. Prevents a stop so tight that ordinary noise takes it out before the idea has a chance to be right or wrong.
These will sometimes refuse a trade you wanted. That refusal is the feature, and it is also why the backtest's numbers and a cost-blind calculator's numbers will not agree.
Managing an open position
Trailing stop loss moves a stop in your favour as a position develops, so an advance can be protected without needing to pick an exit in advance.
Partial take profit closes part of a position at a target while leaving the rest running. It changes a strategy's distribution of outcomes rather than its average, which is usually the point: fewer full round trips back to breakeven, at the cost of a smaller best case.
Both are configured per strategy in the builder, and both are included in backtests and paper trading, so their effect shows up in the scored result instead of being an untested afterthought.
Alerts for operational failures
A separate class of risk has nothing to do with strategy quality: the plumbing breaking. AKQX sends Telegram alerts for these, covering stale candle or market data, a stale broker balance, broker order rejections, insufficient capital or margin, and a strategy entering a cool-down after consecutive losses.
Stale data deserves particular mention. A strategy acting on prices that stopped updating is the worst available failure mode, because it looks like it is working. AKQX skips a signal rather than trading on old prices, and tells you it did.
For real crypto trades there is also reconciliation against the broker's own records, so the platform's view of your positions is checked against the exchange's rather than assumed.
Risk limits as a backtest verdict
Risk is not only enforced at runtime, it is also scored. In the backtest, risk carries 50 of the 350 available points, and a result is rejected outright if maximum drawdown exceeds 30 percent, regardless of how profitable it looked. A strategy can be rejected for being unsurvivable even when it made money in the simulation.
That ordering is intentional. The limits in this page are what a strategy has to live inside, and the scorecard asks whether it could.
Questions about risk management
What is a circuit breaker in algo trading?
A circuit breaker stops a strategy automatically when a condition you set is met, such as a number of consecutive losses or a loss total for the day. It then holds off for a cool-down period instead of re-entering immediately. Its job is to end a bad run rather than let it compound.
What is a daily loss cap?
A limit on how much a strategy may lose in one day before it stops trading until the next session. It converts an open-ended bad day into a bounded one, which matters because the worst outcomes in automated trading usually come from a strategy that kept going.
What is a fee-to-risk breaker?
A guard that refuses a trade when the estimated trading cost is large relative to the risk being taken. Tight-stop setups are the usual trigger: the reward-to-risk looks excellent until fees are counted, and then the edge is gone. The breaker catches that before the order, not after.
Why does AKQX enforce a minimum stop distance?
Because a very tight stop makes fees and slippage dominate the outcome, and it gets taken out by ordinary noise rather than by the idea being wrong. A minimum distance keeps a stop far enough away that it is testing your thesis instead of testing the spread.
Do these controls apply during paper trading too?
Yes, all of them. That is deliberate: it is far cheaper to discover that a circuit breaker halts your strategy while the money is virtual, when you can still see which rule tripped and decide whether the rule or the strategy needs changing.
What do the Telegram safety alerts cover?
Operational problems rather than trade signals: market or candle data going stale, a broker balance going stale, broker rejections, insufficient capital or margin, and a strategy entering a cool-down after consecutive losses. They tell you when something is wrong, not what to trade.
Can AKQX move money out of my exchange account?
No. AKQX holds no funds and needs no withdrawal permission. Create API keys with read and trade permissions only, leave withdrawals disabled, and there is no technical route for funds to leave your account through AKQX.
Related pages
Test a strategy with the guards on
A free account includes 1 paper algo and 10 backtests a month, with every risk control active.