Building trading bots in public. Every bot gets a post-mortem: wins, losses, bugs, code. MT5 · forex · gold · crypto. No signals. Not financial advice.
My trading bot lost money for over 2 years of backtesting.
166 trades on EURUSD. 35.5% win rate. -$157.90 on a $1,000 demo account.
I had the whole thing audited line by line. Here's exactly why it lost 🧵
question for people who build bots: what's the most convincing pattern you found in your own results that turned out to be a side effect of your own code?
mine was "every trade past +1.5 atr wins." the breakeven rule made that true by definition.
and it came from 33 trades. the stop-loss change it justified pushed the eurusd win rate down to 33-36%, when the system needed about 40% just to break even.
the lesson i wrote down: check whether your "finding" is just your own rule talking back.
at +1.5 atr the stop moved to breakeven + 0.1 atr. after that the trade literally could not lose.
so of course they were all winners. the rule guaranteed it. it said nothing about my entries.
@mql5com the "validation on live ticks" bit matters. one mt5 gotcha i found: the calendar functions return no data in the strategy tester, so my news filter silently did nothing in backtests and they included trades a live run would skip
the ads say $1,000 into $3,000 a month.
i gave my bot $1,000 on a demo account and ran it through a bit over two years of real-tick history.
it finished on $842.10. the whole run, not a cherry-picked week.
@QuantifiedStrat how many whipsaw trades does the 250-day ma take during those flat gold stretches? curious what the longest losing streak looked like in that backtest
@ConcretumR survivorship bias is brutal on equities. for fx or crypto where there's no constituent list, what do you use to catch the same kind of backtest flattery?
@DaviddDotTech handy for pulling scripts fast. does it flag indicators that repaint or peek at the forming bar? those are the ones that look amazing in a backtest and fall apart live
@MoonDevOnYT the "can't explain" part is the one that gets me. one of my tests hit 18.1% drawdown because the 10% guard was rolling and re-enabled at 5%, took me ages to even see it
@StoicTA the 'what would prove you wrong' line is the one i skipped on my last bot. i made a fix off a diagnosis from only 33 trades and results got worse. wrong on the sample size, not the idea
@mql5com how does the history side handle netting accounts? partial closes on a netted position seem like the hard case for rebuilding mql4-style closed trades from deals
honest question for mt5 people: how many trades before you trust a backtest?
i'm setting 200+ as the floor for the next bot. my last one had its exits re-tuned off 33-trade samples, and you can guess how that went.
@MoonDevOnYT more runs only help if they're actually different runs. two of my three backtests turned out to be the same run with different end dates, so the extra confidence was fake
@quantscience_ fair point. i found a macd filter in my ea that did nothing: the min value was a raw 0.00005, and usdjpy trades around 150, so every cross passed. extra layers can hide stuff like that