KenKem Journal

Why Do Trading Bots Blow Up Accounts?

· #risk-management #trading-bots #drawdown #systematic-trading #gold-trading

Most trading bots that blow up an account were not wrong about the market. They were wrong about how to lose. They add to positions that are already losing, they count risk per chart instead of per account, and they carry safety limits that nobody ever tested. A bot built to survive does the opposite on all three, and it looks less impressive in a backtest because of it.

A dim corridor of numbered electrical switchgear cabinets with a single light at the far end
Every panel in a switch room exists to fail safely before the whole building does. Photo: Kostiantyn Klymovets / Pexels.

MasterVP · Systematic Trading Journey

Written by the founder of KenKem, a software engineer of twenty years who traded gold by hand before building the research stack behind MasterVP. As a self taught quant trader I underestimated one part of this work for longer than any other: not finding an edge, but keeping an account alive long enough to collect one. This is knowledge sharing from that work, not a recommendation to trade anything, and every figure below is a backtest or a simulation on real tick data, dated and labelled.

Why does a martingale or grid bot look so good in a backtest?

Because it moves losses out of sight, not out of the account.

A martingale increases its size after a loss so that one winner recovers everything before it. A grid keeps opening positions at intervals while price moves against it, then closes the whole basket on a small bounce. Averaging down is the same idea done by hand. All three turn many small realised losses into a few large unrealised ones, and a curve drawn from closed trades only shows the part that was allowed to close.

That is why the curve is smooth right up to the day it is not. The losses were never removed. They were stacked, and the stack comes due in one move that does not bounce. An equity curve that includes open positions tells that truth much earlier than a balance curve does, so the first thing worth asking about any smooth bot is which of the two curves you are looking at.

What happened when I built a grid and a martingale and tested them?

Every version lost to the plain single position.

In July 2026 I built a basket mode into the Dquants tick engine I developed: several concurrent positions on the same signals, a martingale variant that added against the move, a pyramid variant that added with it, and a basket exit. I wrote the pass rule down before running anything, then tested eleven pre-registered variants on real gold ticks from 2024 to 2026 against the ordinary one-position system. Drawdown was measured on equity including open losses, because a balance-only drawdown would have flattered the grid.

None of the eleven beat the control, not on net result and not on how quickly it climbed out of its drawdowns. The martingale variant finished below zero. The gap was wide enough that I stopped there rather than sweep further.

The mechanism is ordinary arithmetic. My edge per trade is thin, and every leg in a basket pays its own spread. Stack five or six positions on one signal and you pay the toll five or six times for one idea. Splitting the risk across legs did reduce drawdown, but risking less on the single position reduces it just as much without the other costs. The basket mode stays switched off and never went into the Expert Advisor.

The test that killed it is the one I now apply to every risk idea, and it killed pyramiding and double positions before it: re-size the plain system to the same drawdown and compare. Any change makes more money by taking more risk. The only fair question is whether it still wins at equal drawdown.

Why is drawdown the first number to ask for?

Because drawdown decides whether a person can stay with a strategy, and profit does not.

As of August 2026, on release 1.19, the five minute gold system at its standard risk tier fell 12.68% from peak to trough on a $100,000 test account between January 2024 and May 2026, across 2,187 trades on real ticks. That number only means something next to its base and its window, which is why both are stated. A drawdown percentage with no account behind it is decoration. I wrote more about why this ratio of pain to progress matters in the Calmar ratio article.

I do not size off that number either. An earlier stress test on the locked configuration, at a higher risk setting, reshuffled its trades 20,000 times to rehearse the paths that did not happen. The median path reached about a 24% drawdown, one in twenty went past about 38%, and the worst reshuffle reached about 55%. That spread is why my own notes say plan for a 30 to 40 percent peak. A measured drawdown is closer to the floor of what can happen than to the ceiling.

How do you make a drawdown smaller without simply trading smaller?

You remove the trades that carry the damage, and you shrink size while the account is already hurt.

Two mechanisms survived a pre-registered study of five. The first is an expensive-day standby. The system measures how large the spread is against the market's recent movement and stands aside for the day when that toll eats too much of what a trade can realistically earn. It skipped roughly one trade in three, concentrated in the hostile 2024 stretch. The second is a drawdown de-risk: while the account sits far enough below its own equity peak, new positions are taken smaller, and full size returns on recovery. In a MetaTrader 5 head to head on identical data, window and account, January 2024 to May 2026 on real ticks, those two switches cut the worst peak to trough loss from about 57% to about 22%, and the worst half year loss to roughly a third.

The three that failed matter just as much. A daily loss cutoff helped nothing, because the bad days it clipped came right before the recoveries it also blocked. A hard drawdown halt was catastrophic. And lowering the profit target, the intuitive way to bank earlier and feel safer, made drawdown worse for the eighth time in my research, because the large winners are what climb out of a hole.

One side effect surprised me. The most aggressive of the three risk tiers takes four times the conservative tier's risk per trade, but its drawdown came out only about three times larger, 21.17% against 6.94%. The de-risk engaged on more than half of the aggressive tier's trades and almost never on the conservative one. Protection makes risk nonlinear, which is exactly why one result cannot simply be rescaled to predict another.

Why is the account, not the chart, the unit of risk?

Because two systems on one account can lose on the same move, and the account does not care which one caused it.

I run a five minute and a ten minute version of the same auction idea. Month to month they correlate at about +0.59, which looks like diversification, and in one sense it is: the pair's drawdown came in well below the sum of the two legs, and that held in five of five half year periods. But monthly correlation only answers whether they win and lose together. It does not answer how much is exposed to one adverse move at the same instant, so I measured that separately on the real fills.

The two clocks frequently fire on the same breakout, minutes apart, in the same direction. Same-direction overlap accounted for 20.2% of the time the book was in the market, and opposite-direction overlap for 0.8%. For open risk they are one signal expressed at two speeds. The worst single day across both came in under half of the daily protection line they run against. That is the reassuring half, and I only know it because I stopped assuming the exposures add up politely.

That is why the Account Guardian in the Expert Advisor works at the account level. It watches total equity against a daily loss line and an overall drawdown line, and steps in before either is crossed rather than after. It is shared across every KenKem Expert Advisor on the terminal, so they respect one limit instead of each breaching its own, and it deliberately ignores which system opened a position. It ships switched off, and the percentages are the trader's to set against their own account or firm rules.

Can a safety limit be the thing that blows up the account?

Yes, and it is the failure I would least have predicted when I started.

Protective code fails quietly. When it is wrong it usually does nothing visible: it never fires, or it fires too early and costs money nobody notices. In August 2026 I audited mine for exactly that, and the audit found real problems.

Two of my own shipped five minute presets set a drawdown halt below the drawdown their own risk setting produced, and that halt could not reset. In the backtest both simply stopped trading in April 2024 and never started again, 104 trades into 2,233. An audit found it, not a customer, and both presets were withdrawn.

The second one was worse, because it looked responsible. On a prop firm preset, the guardian's force close line sat above the Expert Advisor's own brake on opening new trades, so the account could be flattened before it had ever stopped adding risk. I simulated the evaluation from all 567 possible start dates in the window. On the worst of them, the path that ended the window down about 1.9% without the guardian was force closed at an 8% loss and locked with it. That happened on 2 of the 567 start dates, at a higher risk setting than the one that ships, which never came near the line. The fix reordered the lines so the entry brake always acts first, and it changed nothing on any other path.

Those 567 starts overlap heavily and all resample one history, so they measure how much the outcome depends on when you start, not what the future holds. They were still enough to catch a protective setting doing harm. A limit that has never been tested is a guess with a confident label on it.

What does a prop firm evaluation expose that a retail account hides?

The path, and the cost.

A retail account forgives almost everything: no daily loss limit, no fixed floor, unlimited time to recover. The evaluation I test against has a hard 5% daily loss limit and a hard 10% overall limit measured from a static floor that never rises with profit, on a materially wider spread with commission and financing charged. One bad day ends the attempt, so the order in which losses arrive suddenly matters as much as their total.

My best five minute system did not survive that move. Its expectancy per trade compressed by about 60% on that feed, and its drawdown came within 0.8 points of the firm's failure line. Shrinking position size would have fitted the drawdown and left the real problem, a fast clock paying a fixed toll on every trade, exactly where it was. The spread is a fixed cost per trade while the room a trade has to work grows roughly with the square root of the timeframe, so the answer was a slower clock where the same toll is a smaller share. The ten minute version is what runs there.

I test on the harder venue on purpose now. A result that only exists on your friendliest broker is a result about the broker.

What stays the trader's decision?

All of the risk, and that is by design.

In the Expert Advisor the strategy internals are compiled in and locked, so the tested behaviour cannot be broken by turning a dial. What the trader sets is the part that has to fit their own account: risk per trade, the session hours it may trade, and whether the guardian is on and where its lines sit. It executes the rules that were configured. Nobody is trading anyone's money for them, and the risk configuration stays the trader's responsibility.

A bot that takes emotion out of the click does not take responsibility out of the settings. It moves all of it to before the session starts, which is where it belongs.

Frequently asked questions

Why do martingale trading bots eventually fail? Because they convert many small losses into a rare, very large one. Increasing size after each loss makes the curve smooth while the market keeps bouncing, and a single move that does not bounce collects everything at once. In my July 2026 test on real gold ticks, the martingale variant finished below zero while the plain single-position system stayed ahead of every basket variant.

Is a grid bot safer if every position in the grid is small? Smaller legs lower drawdown, but so does a smaller single position, without the extra cost. Every leg in a grid pays its own spread, so a thin edge gets diluted across the basket. None of the eleven basket variants I tested beat the single position on net result or on recovery.

How much drawdown should a trading bot be expected to have? More than its backtest shows. A backtest is one path through history, and reshuffling the same trades produces worse ones. On my own system the measured peak to trough was 12.68% at the standard tier, while an earlier 20,000-path stress test put one path in twenty past about 38%, which is why I plan for a 30 to 40 percent peak.

Does a daily loss limit reduce drawdown? Not in my study, and it can hurt. The bad days a daily cutoff clips often come right before the recoveries it also blocks. In a pre-registered study of five risk controls it helped nothing, while a hard drawdown halt was catastrophic.

Does taking profit earlier reduce risk? In my research it has done the opposite eight separate times. Banking earlier trims exactly the large winners that climb out of a drawdown. The two controls that did work were standing aside on days when the spread was too expensive and trading smaller while below the equity peak, which together cut the worst loss from about 57% to about 22%.

Is running two trading bots on one account real diversification? Partly, and less than it looks when both trade the same instrument. My five and ten minute systems correlate at about +0.59 month to month, but they often fire on the same breakout, with same-direction overlap covering 20.2% of the time the book is in the market. Risk has to be measured at the account level, not per chart.

What is an account-level circuit breaker in an Expert Advisor? A layer that watches the whole account's equity rather than one strategy's trades. In the MasterVP Expert Advisor it is the Account Guardian: shared across every KenKem Expert Advisor on the terminal, blind to which system opened a position, and designed to act before a daily or overall line is crossed. It ships switched off, and its force close line has to sit between the Expert Advisor's own brake on new entries and the firm's failure line, so new risk stops first and the account is flattened before the firm's limit. I learned that order by getting it wrong once.

Why do trading bots fail prop firm challenges? Because a prop evaluation tests the path, not the average. A hard daily limit and a static floor mean one bad day ends the attempt, and wider spreads with commission shrink a thin edge further. My own best five minute system came within 0.8 points of a firm's failure line and was moved to a slower clock rather than simply sized down.

If you want to see how these ideas became a product, MasterVP is my own intraday method built on public volume profile theory. It ships as the Master Volume Profiler indicator on TradingView and MetaTrader 5, which shows the read and leaves the order with you, and as Master Volume Sniper on MQL5 market, an Expert Advisor that executes the rules and risk settings you configure.


This article was composed from the risk and survival posts of the MasterVP build log series. Educational purpose only. Not financial advice. Figures cited are backtest and simulation results on real tick data, and past performance does not guarantee future results. Every trader remains responsible for their own risk settings and decisions.

← All journal articles

Chat