Puzzled by an optimization problem

 
Hi,
After nearly two years writing and testing EA's I'm experiencing a problem running optimization. I wonder if somebody has already had such a problem and how can be solved.
I run optimization for any EA and after looking at the results I choose, for instance, the line with the best net profit.
When I run the backtesting for the same period with the same parameters the results are quite different.
In some ocasions I had found slight differences but now the differences are very high.
The backtesting have a 90% Modelling quality.
Any idea that can help me?
Has somebody else experienced something similar?

Thanks in advance.
 
Josep:
Hi,
After nearly two years writing and testing EA's I'm experiencing a problem running optimization. I wonder if somebody has already had such a problem and how can be solved.
I run optimization for any EA and after looking at the results I choose, for instance, the line with the best net profit.
When I run the backtesting for the same period with the same parameters the results are quite different.
In some ocasions I had found slight differences but now the differences are very high.
The backtesting have a 90% Modelling quality.
Any idea that can help me?
Has somebody else experienced something similar?

Thanks in advance.

Are u connected to a broker while doing this? If so then the market properties must have changed between the time u run the optimization and the time u run the test... Info and solution here -> https://www.mql5.com/en/forum/123999.

 
Are you changing the optimized parameters in the code and recompiling, or unclicking optimize and setting the initial values to the optimized ones?
Otherwise you're running with the original values, not the optimized ones.