What Do You Do When Your Trading System Stops Working?
· #risk-management #drawdown #overfitting #backtesting #systematic-trading
You find out what changed in the market before you change anything in the strategy. When mine spent most of 2024 in drawdown, the honest explanation turned out to be arithmetic. Across that year the spread on gold consumed about 8.6 percent of ATR, against roughly 3 to 4 percent in the surrounding periods. Nothing in my entries had broken.
As a self taught quant trader I came close to doing the thing that destroys working systems, which is rebuilding everything while it hurts. What follows is what I found instead, the fix that came out of it, and the machinery I keep so that I can tell whether a fix is real or just another curve fit.
How do you tell a broken strategy from a hostile market?
By asking what changed rather than what to change. Those two questions lead to very different places, and only one of them has an answer you can check.
2024 was not a bad week. It was a bad regime, and it stays in the record rather than my quietly starting the chart in 2025. For most of that stretch the system was underwater. The temptation at that point is to reach for a new filter, a regime classifier, some machine learning, anything that feels like progress.
Instead I went looking for a measurable difference in the market, and I found one. The cost of trading relative to how far the market was moving had roughly doubled. That is the whole story. The edge was the same size it had always been. The toll to collect it had grown past what the strategy was designed to survive.
A scalping edge is a small number by nature. When the cost line rises to meet it, what is left is not a smaller edge. It is no edge, being traded enthusiastically. I only found the arithmetic because costs were modelled from the first run rather than subtracted at the end.
Why was the fix teaching the system to refuse a day, not predict better?
Because the problem was affordability, and you do not solve an affordability problem with a better forecast.
I did not make the strategy smarter about expensive conditions. I gave it permission to decline them. The system already measures, every day, how large the trading toll is relative to what the market is realistically offering. When that ratio is bad enough, it stands aside for the day. No prediction, no indicator consulted. It is the same reasoning as declining a job that pays less than the commute. In the validated window it skipped roughly one trade in three, concentrated in the hostile stretch.
A second mechanism came out of the same study. While the account sits meaningfully below its own peak, new positions are cut to about half their normal size, and full size resumes on recovery. Losing streaks dig a shallower hole.
Head to head in the MetaTrader 5 tester on identical data, window and account, with those two switches as the only change, the worst peak to trough loss fell from 57 percent to 22 percent. That is the difference between a number that would end most accounts and a number a person can actually sit through. Backtest, not live.
The honest boundary that comes with it: the threshold is tied to one broker's spread habitat. It is the shipped default there, and on a feed with wider spread that same threshold would stand the system aside almost every day, so copying the number across brokers would silently mute the strategy. The threshold was also not re tuned for this study, and the configuration still owes a live forward test before it earns anything stronger than validated in backtest.
Which risk controls failed, and why publish those at all?
Three of the five candidates failed, and they are worth more to a reader than the two that passed.
The study was pre registered, which for me means the decision rule was written down before I saw any result. Five candidate risk mechanisms went in. Two survived.
- A daily loss cutoff helped nothing. The bad days it clips arrive immediately before the recoveries it also blocks.
- A hard drawdown halt was catastrophic.
- Reducing the profit target, the intuitive take profits earlier to reduce risk idea, made the drawdown worse. The large winning trades are what climb out of drawdowns.
That third one has now failed eight times in this program, and I keep re testing it because it feels so obviously right. That feeling is the reason it keeps coming back, and the registry is the reason it keeps losing.
The biggest risk upgrade I have ever shipped was teaching the system to do nothing. Survive first, profit second. That order is not a slogan, it is the only order that compounds.
How do I know that fix is not just another curve fit?
By pricing in how wide the search was before quoting anything that came out of it. A backtest is not a measurement. It is the winner of a competition you ran, and its apparent quality depends entirely on how many entrants there were.
To ship three systems, my C++ tick engine simulated 7,718 distinct strategy configurations, roughly two and a half thousand examined for every system that made it out. A further 178 independent MetaTrader 5 real tick runs were configured and executed by hand as referee checks, each one a separate manual setup rather than a batch job.
Think about what that means for the winner. Run one idea, test it once, and a good result is weak evidence but honest evidence. Run two hundred variants and keep the best, and a good result is close to certain regardless of whether anything real is there. The number on the screen looks identical in both cases. It means almost nothing in the second, and no cheating is required to get there. That is simply what randomness does when you sample it thousands of times and keep the best sample.
There is a version of this trap that catches good engineers specifically. You test, it fails, you adjust one parameter, you test again. That feels like debugging. It is a search, and every iteration quietly enlarges the number of tries the final result has to be discounted for. The counter does not reset because the attempts were thoughtful.
So the honest question about any backtest is not how good is this result. It is how good is this result, given how many results were generated to find it. Those two numbers pull in opposite directions, and only the first one ever appears in the screenshot. This is why I discount my own survivors, and why sample size and genuinely untouched out of sample data matter more to me than the shape of a curve.
What does a pre registered experiment registry look like?
Unimpressive, which is the point. The part of my process I am most confident about is also the least photogenic.
Every experiment is registered before it runs, with the decision rule written down in advance. What would count as a pass. What would count as a failure. Declared while I still do not know the answer, which is the only moment a person can declare it honestly.
The registry currently holds 137 experiments. 45 were rejected outright, 72 were kept as research only, interesting but not shippable, and 11 reached a lock. So 122 of 137 did not become a product, and all of them are still queryable.
I keep the failures because a rejection ledger is the only thing that makes a success claim checkable. Anyone can show you what worked. The question that separates a process from a highlight reel is whether the things that did not work were recorded with the same care, at the time, before anyone knew how the story would end.
Writing the rule down first is the whole mechanism. Once you have seen a result you can always construct a reason it counts. I have done it. The registry exists because I do not trust myself in that specific moment, and building a process around not trusting yourself at predictable moments is most of what systematic means.
What is the market model underneath all of this?
An auction. A time based candle chart answers the question when. A volume profile answers the question where, and where is usually the more useful one.
Price moves to advertise. Volume decides whether the advertisement was accepted. Everything else in this vocabulary follows from that one sentence. The price with the most activity is where the most business got done, which is why price keeps returning to it and exactly why it is not a target. It is a magnet with no schedule. Shelves where a lot of trading happened slow price down. Gaps the market rejected quickly get travelled through fast, because there is nothing there to trade against.
Then the part most people skip. Price leaving the value band is not a breakout. Price leaving it and staying out while activity builds is acceptance. Price poking out and being pushed straight back inside is rejection, and rejection is often the better trade in the opposite direction. A break with nothing behind it and a break with the tape behind it are two different events wearing the same candle. You trade the reaction to a level, not the level.
What is volume on gold actually measuring?
Tick count, not traded volume. This is the caveat that almost nobody selling volume analysis will tell you, and I would rather you heard it from me.
On spot gold and most CFDs there is no central exchange reporting how much actually changed hands. What your platform labels volume is how many price updates arrived in that period. Tick count measures how busy the feed was. Traded volume measures how much business was done. Those are different things.
They correlate well enough to be genuinely useful, and I use tick volume extensively as the foundation of the whole approach. But anyone selling you institutional order flow on a retail gold feed is selling you a proxy and calling it the thing.
You can verify this in about ten minutes in your own broker's documentation, and I would rather you did. The proxy is still worth building on. Where tick activity clusters really does mark where the market spent its attention, and that structure holds up. A tool whose limits you understand is safer than a tool you believe in.
Why do I make the decision once, in daylight?
Because the alternative is re deciding at three in the morning with money on the screen, which is the most expensive time a human being has ever chosen to think.
I tell people I am lazy and they hear cutting corners. I mean the opposite. I am unwilling to do the same thing twice, and that unwillingness is a tax paid up front rather than a shortcut taken at the back. The first version of every automation I have built took longer than the manual work it replaced. Then it ran a few hundred times.
The Dquants engine I developed took a long while to build, and it speeds up the whole development process from hypothesis validation through to deployment. The speed matters less than the fact that a rejected result leaves a record I cannot quietly edit later.
A systematic strategy is that same bargain applied to decisions. Do the thinking once, with evidence, and write it down. The failure is not laziness. It is laziness spent at the wrong moment, in the one pass that decides whether you ever have to open the thing again.
What do I let AI decide, and what do I not?
A model may produce anything I am able to verify, and is trusted with nothing I cannot. That sounds obvious and it is surprisingly sharp in practice, because it sorts the work cleanly.
The most valuable thing I use AI for is not writing code. It is trying to destroy what I have already built. When a system passes my own tests that means very little, because I designed the tests and I share all of its blind spots by construction. So I hand the whole thing over and ask for the case against it. Not is this good, which invites agreement. Where is this overfitted. What would a sceptical quant say about this sample size. What am I claiming that my evidence does not actually support. Some of what came back was wrong. Some of it I would otherwise have discovered later, in public, in front of somebody who had paid me. It works because the model is not invested, and does not flinch at a conclusion that would mean throwing away the week I spent building the thing it is questioning.
The other side of the line is just as firm. Code I can verify: it compiles or it does not, tests pass or they do not, and my two engines either reproduce each other or they disagree and I go find out why. A number in a post I cannot verify by reading it, because wrong looks exactly like right. So no statistic in anything I publish comes from a model, ever. Every figure traces to an artefact I can open, and when a document and a post disagree, the document wins and the post gets fixed.
Fluency is not accuracy, and a model is far better at sounding right than at being right. That is not a complaint about the tool. It is a description of what the tool is, and knowing it is what makes the tool safe to hand real work to.
Frequently asked questions
What should you do when a trading strategy stops working? Establish what changed in the market before changing anything in the strategy. In my case the cause was measurable and boring: across 2024 the spread on gold consumed about 8.6 percent of ATR against roughly 3 to 4 percent in the surrounding periods. Entry quality had not collapsed, the cost to volatility ratio had crossed the point where a scalping edge can survive its own costs. Reaching for a new filter first would have destroyed a working system to fix a market condition.
Does trading less actually reduce drawdown? It did in my pre registered test, though only because the days being skipped were specifically the unaffordable ones. Adding an expensive day standby plus half sizing while below the account peak, head to head on identical data, window and account, moved the worst peak to trough loss from 57 percent to 22 percent. That is a backtest result on real broker tick data, not a live track record, and the standby threshold is specific to one broker's spread habitat.
Why publish the risk controls that failed? Because a claim you cannot fail honestly is not a claim. Three of five pre registered mechanisms failed. A daily loss cutoff helped nothing because the bad days it clips precede the recoveries it also blocks. A hard drawdown halt was catastrophic. Reducing the profit target made drawdown worse, for the eighth time in this program, because large winners are what climb out of drawdowns.
How does search width make a backtest misleading? If you generate enough candidates, an excellent looking result appears by chance alone. To ship three systems my C++ tick engine simulated 7,718 configurations, roughly two and a half thousand per survivor, plus 178 hand configured MetaTrader 5 real tick referee runs. The useful question is not how good a result is, but how good it is given how many results were generated to find it. Only the first number reaches the screenshot.
What is a pre registered experiment registry? A record of every experiment with its pass and fail criteria written down before the result is known. Mine holds 137 entries: 45 rejected outright, 72 kept as research only, 11 reached a lock. So 122 of 137 never became a product, and all of them remain queryable. Once you have seen a result you can always construct a reason it counts, which is precisely why the rule has to be declared beforehand.
Is volume on a gold CFD real volume? No. There is no central exchange reporting how much changed hands on spot gold, so what the platform labels volume is the tick count, meaning how many price updates arrived. It correlates well enough to build on and I use it extensively, but it is a proxy. You can confirm this in your own broker's documentation in about ten minutes.
What is the difference between a breakout and acceptance? Price leaving the value band is not a breakout. Price leaving it and staying out while activity builds is acceptance. Price poking out and being pushed straight back inside is rejection, which is often the better trade in the opposite direction. A break with nothing behind it and a break with the tape behind it are two different events wearing the same candle, and telling them apart stops more bad trades for me than any indicator I have added.
Are these live trading results? No. Every figure here is research output: backtest and validation runs on real broker tick data, and counts from the experiment registry. I run a live test and monitor it, and I will publish what it shows, but quoting research output as performance would be dishonest. The configuration described here still has to clear a live forward test before I would call it anything stronger than validated in backtest.
Has any of this failed? Repeatedly, and that is the useful part. 122 of 137 registered experiments never shipped. Three of five risk mechanisms were rejected. Under an older configuration the full cycle running through the 2024 cost regime took a 74.2 percent peak to trough drawdown on real MetaTrader 5 fills, with the trough in March 2025. That number is disclosed rather than hidden, because it is what motivated the affordability check in the first place.
Which KenKem product does what? The Master Volume Profiler indicator runs on TradingView and on MetaTrader 5, and it shows the read while leaving the order with you. Master Volume Sniper on the MQL5 market is the Expert Advisor side, and it executes only the rules and risk settings a user configures for themselves. Neither is a signal service, and neither removes the need to think.
Written by KenKem, a software engineer and founder of twenty years, learning quantitative trading in the open and publishing the process, rejections included.
This article was composed from the engine internals posts of the KenKem build log series. Educational purpose only. Not financial advice. Figures cited are audit, backtest and validation results on real tick data, not a live track record. Past performance does not guarantee future results.