Page 1 of 1

Common early mistakes when building EAs

Posted: Tue Nov 03, 2026 12:33 pm
by FXS London Scalper
A list of mistakes that new EA builders often make, collected from threads here and elsewhere. Maybe useful for someone starting.
  • Testing only in "every tick" mode on generated data. Use real ticks where the broker provides them.
  • Ignoring commission in the tester.
  • Hard-coding pip size, which breaks on 3-digit yen pairs and metals.
  • Not checking order return codes, so failed orders go unnoticed.
  • Optimising many parameters on a short period, then being surprised when it fails.
  • No logging, so a bad live trade can't be explained afterwards.
  • Using local time instead of server time, or forgetting daylight saving changes.
A good warm-up exercise: write an EA that does nothing but place and manage one trade with full logging and error handling. Run it on demo for a week. It's boring, but it builds the scaffolding everything else needs.

Another: rewrite the same simple strategy twice, once quickly and once carefully, and compare the logs.

What mistakes would you add?

Re: Common early mistakes when building EAs

Posted: Wed Nov 04, 2026 1:17 pm
by Amanhasnoname
One I would add is not testing with the spread that the live account actually has. For a long time I backtested with a fixed two pip spread that I had picked at random, and when I switched to the variable spread from my broker's history, a scalping EA that looked profitable lost money in the quiet Asian hours. I now export the real spreads and run the test on those hours separately.

Another one is trusting the optimiser's best result. I once picked the top pass from a few thousand runs and it was a narrow spike in the parameter space, so a small change gave a completely different outcome. These days I look for a plateau where neighbouring values also work and I take the middle of it.

Your warm-up exercise is solid. My own was a single trade EA with a log file, and the thing I found was that my code treated a requote as a success. It is a boring project, but I reuse the scaffolding for everything now.