How to prevent overfitting on historical data

 
Hello, is there a sure to prevent overfitting when testing a system over historical data?
 

MQL5 Cookbook: Reducing the Effect of Overfitting and Handling the Lack of Quotes - the article

And there are several mini-articles in the blogs so you can use search to find them - for example this search results.
MQL5 Cookbook: Reducing the Effect of Overfitting and Handling the Lack of Quotes
MQL5 Cookbook: Reducing the Effect of Overfitting and Handling the Lack of Quotes
  • www.mql5.com
Whatever trading strategy you use, there will always be a question of what parameters to choose to ensure future profits. This article gives an example of an Expert Advisor with a possibility to optimize multiple symbol parameters at the same time. This method is intended to reduce the effect of overfitting parameters and handle situations where data from a single symbol are not enough for the study.
 
Kekeletso Mofokeng:
Hello, is there a sure to prevent overfitting when testing a system over historical data?

I check and select the historic data for the market behaviour: flat, trend, trend reversal, spikes, crashes, high/low volatility, ...

And then I test an EA against theses specific scenarios.

 
Carl Schreiber #:

I check and select the historic data for the market behaviour: flat, trend, trend reversal, spikes, crashes, high/low volatility, ...

And then I test an EA against theses specific scenarios.

Do timeframes also play a role in back testing ?
Reason: