The 58% Win Rate That Was My Own Code Lying To Me
I have been building an automated trading system for over a year now, and the most useful thing that came out of it was the test that killed the un-fit strategies.
Below I have shared my story of an idea that passed four checks I’d set in advance and died on the fifth, and why the fifth one is now the first thing I run.
The setup
I like to day-trade MNQ, and I’d built a framework around specific price levels that I have created. The core claim was simple: price reacts at certain levels within each hundred-point block. Falls into one, bounces.
I used backtesting to test the base version honestly. When price falls into a level ending in .66, buy it, take profit at +25 points, stop at −25.
The reason I tested this it to confirm that geometry matters. It’s symmetric, same reward as risk, so with $1.24 round-trip friction on a micro contract, breakeven is a 51.24% win rate. Not a rigged test. A coin flip pays nothing.
MNQ is around 30,000 points currently. The test, pooled across every hundred-point block had 51.5% on 5,551 trades.
Then I ran the identical rule on random, arbitrary, levels; .37, .53, .84, .21, numbers with no significance in my framework or anyone else’s.
50.7%.
8/10’s of a point of edge, on five and a half thousand trades. That’s nothing. My framework’s levels were indistinguishable from lines I made up.
Except for one
When I broke it down by block, one stood out badly:
x066 582 trades 53.1%
x166 532 47.7%
x266 524 51.7%
x366 528 53.4%
x466 514 58.4% <--
x566 564 49.1%
x666 557 49.6%
x766 547 52.5%
x866 598 50.5%
x966 605 49.8%
58.4% on 514 trades, profit factor 1.34, +$3,613.
My first reaction was to forget about it and go with it anyway. Ten buckets, one looks good, that’s what randomness does, you don’t get to keep the best of ten and call it a discovery, I wish it worked that way.
That reaction was right, and my process was wrong. I dismissed it by pattern-matching instead of doing the arithmetic. So I did the arithmetic. The binomial standard error at n=514 is about 2.2 points, which puts 58.4% roughly 3.5 standard deviations above the control mean. Even accounting for having looked at ten buckets, that’s not a shrug.
This brought me to test it properly.
Four gates, all passed
I wrote the pass bars down before running anything. This is an important step so you don’t continue to ignore the results.
1. Beat an empirical control distribution. Not a theoretical one. I ran the same rule on 8 arbitrary offsets × 10 blocks = 80 buckets of meaningless levels, each with a comparable sample size. Then asked how many of those 80 reached 58.4%.
control win rate: mean 50.8% sd 2.30 max 55.2%
buckets >= 58.4%: 0 of 80
x466 is +3.29 SD from the empirical distributionZero. And note the empirical standard deviation came in at 2.30 against the binomial’s 2.2, I had expected clustering to fatten the real spread and swallow the result. It didn’t.
2. Per-year consistency. The gate that kills most things I test. If it doesn’t survive multiple years, then there is no edge.
2020 62.7% +$682
2021 70.7% +$788
2022 50.5% −$70
2023 55.1% +$177
2024 56.7% +$587
2025 59.2% +$782
2026 61.2% +$667Six of seven positive, and the miss is $70 on 97 trades; flat, not broken.
3. In-sample vs out-of-sample. Split at 2024.
IS 254 trades 57.9% PF 1.29
OOS 260 trades 58.8% PF 1.38Nearly identical, out-of-sample slightly better. That’s what a real effect looks like, not what a fitted one looks like. This makes it look very promising.
4. Clears breakeven with room to spare.
Four for four. At that point I was fairly convinced I’d found something.
The flaw
Here is the line in my backtest that killed it:
If the bar’s range contained the level, I filled the trade at exactly that level.
For a limit order, that is optimistic in a very specific and very dangerous way.
Think about what happens on the trades you most want. Price drops to your level, tags it, and rockets away. That’s your best outcome. But a real limit order sitting at that price is at the back of a queue, if price only touches the level and reverses, you very likely never get filled. This is something you don’t consider unyil it’s happening to you live.
Now think about the trades you don’t want. Price drops to your level and keeps going, straight through. Those fill every single time, because the market traded through your order.
So my backtest was booking the winners I’d never have gotten, and keeping every loser. That asymmetry doesn’t need much of a thumb on the scale to manufacture an edge out of nothing.
The kill
The fix is to require price to penetrate the level by some margin before counting a fill. Margin 0 is my original optimistic rule. Margin 2-3 points means price genuinely traded through you, so your order definitely filled.
I swept it:
margin win rate PF $/trade
0 58.4% 1.34 +$7.03 <- the original, optimistic
1 57.2% 1.27 +$5.81
2 53.1% 1.07 +$1.78 <- realistic
3 51.9% 1.02 +$0.58
5 45.6% 0.79 −$5.71Monotonic decay. That shape is the fingerprint of a fill artifact; the edge bleeds out in direct proportion to how honest you make the fills. At a realistic margin it’s making $1.78 a trade, against a tick worth $0.50. Two ticks of slippage and it’s gone. Per-year consistency also drops to 4 of 7.
The 58.4% was substantially my own assumption, not the market’s behavior.
The reflex, and the second kill
My natural next thought was to figure out a way to fi this issue. It can be done through geometry. Widen the stop, move the target, find the settings that work.
So, I ran a 5×4 grid; take-profits of 25/35/50/75/100 against stops of 15/25/35/50, at realistic fills. Nineteen of the twenty cells lost money. The best was the original 25/25, at a profit factor of 1.03. This was unbelievable to me, but statistics don’t lie.
A best cell means nothing on its own, because every bucket has a best cell. So I ran the identical twenty-cell sweep across all 80 meaningless control buckets.
control best-cell PF: mean 1.01 sd 0.09 max 1.28
x466's best cell: 1.03 (+0.17 SD)
buckets whose best cell beat x466's: 31 of 80Thirty-one of eighty made-up levels tuned up better than my candidate. And one of them; x047, an arbitrary offset with no meaning whatsoever. It showed a profit factor of 1.28 and +$3,694 at a 75-point target with a 15-point stop.
If someone handed you that cell cold, it would look like a discovery.
What I actually learned
Optimistic fills manufacture edges. Not small ones. This produced roughly seven points of win rate out of thin air, enough to clear four gates I’d written down in advance. Any test with a limit or touch entry needs a penetration-margin sweep, and monotonic decay across that sweep means the edge was never there.
Sweep the controls, not just the candidate. “My best parameters give PF 1.03” is meaningless until you know that eighty junk levels average 1.01 and top out at 1.28.
Compute before dismissing. I was right that x466 was a lucky bucket, but I was right for the wrong reason, and if the fill test had gone the other way I’d have been simply wrong. A prior is not a calculation.
No mechanism, no strategy. Even at its most convincing, nothing explained why 466 and not 366. Every idea of mine that has survived has a reason attached. This one only ever had a number.
There’s a version of me that stopped at gate four, deployed this, and spent six months wondering why live didn’t match. The fill test cost about twenty minutes to write.
I’ve got the scripts for these tests; the control comparison, the per-year gate, the fill-realism sweep, and a few others. If you want them, or want me to point them at something you’re working on, email me at janheger89@gmail.com.

