Thanks for reading. One more thing I should mention: I always validate with different broker settings (spread, commission, and swap) because the same EA can behave completely differently across brokers. It would be great to hear how others handle broker-dependent parameters in their gold EAs.
I use genetic optimization only to locate promising regions, then a smaller full grid around those regions. The best single pass is usually not interesting. I prefer a wide plateau where nearby settings stay profitable with similar drawdown.
After that I repeat OOS tests across several time windows and worsen spread, commission and delay. For gold I would also test another broker’s data, because one broker-specific result can look much more robust than it really is.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone,
I wanted to share some lessons learned about parameter optimization, hoping to get your feedback and maybe some ideas to improve.
1. Walk-forward optimization beats simple single-period optimization. A strategy that looks great on one year of history often breaks on the next six months.
2. Use a realistic spread model and slippage. Backtesting gold with a 20-cent spread is very different from the real 35-50 cents you see during London/NY sessions.
3. Avoid overfitting by limiting the number of free parameters. I try to keep each EA to no more than 5-6 meaningful inputs, and I check that the equity curve stays smooth across different starting points of the test period.
4. Out-of-sample validation is essential. I reserve the last 20% of history and never look at it during optimization.
5. Be careful with tick data gaps around rollovers and low-liquidity weekends on XAUUSD.
What do you use in your own workflow? Do you prefer genetic optimization or full grid search? Any tips on avoiding curve-fitting when working with gold specifically?
Best regards