Difference between optimization result and backtesting without optimization result (with same parameters)

 

Hello everybody,

i've got the following problem when testing ea:

The result in optimization and testing without optimization are different (same parameters).

I think that come from the spread not taken into consideration in optimization mode.

can somebody could confirm or indicate me the origin of the error?

Thanks a lot by advance.

ps: for information it's MT4 with tickstory.

 

tickstory give you better data than standard mt4 but i belive for testing purpose mt5 platform is best . it give you close to 100% including slippage and floating real spread by default.

 
  1. Why did you post your MT4 question in the Root / MT5 EA section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
    Next time post in the correct place. The moderators will likely move this thread there soon.

  2. Patrick Nebot: I think that come from the spread not taken into consideration in optimization mode.
    Where do you get that notion? It's on the page. The spread is constant during the run. It is the current spread for the pair (your broker,) at the moment you start the test.

    If you start the test on the weekend, the current spread is likely to be very large.

    Always specify Spread

 
whroeder1:
  1. Why did you post your MT4 question in the Root / MT5 EA section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
    Next time post in the correct place. The moderators will likely move this thread there soon.

  2. Where do you get that notion? It's on the page. The spread is constant during the run. It is the current spread for the pair (your broker,) at the moment you start the test.

    If you start the test on the weekend, the current spread is likely to be very large.

    Always specify

1) apologize for the wrong posting.


2) everytime i mention a spread, the spread is the same in optimization and testing, so it is not the current  that is question.

I 've just run a test and the optimization proposition result are really different when you test this result (strategy tester).

This is why, i wonder, from where come this difference.

As most of the difference come in the 1min timeframe modelisation.

I suppose it come from the spread not be taken in consideration in optimization mode.

But it's a supposition and need a confirmation.

You can make a test and try a strategy in 1 min time frame, see the result in optimization, and try to apply one in the test without optimization.

That will result in a different result, strange.

 
I have a similar experience. Some of my EAs have this strange behavior but most of my EAs behave well. I don't think spread has anything to do with it. I think there is a bug in the MT4 optimization.
 

I have a similar problem, do you find a solution?

 
Hello All
Put refreshrates() before every time you use Bid or Ask. Solved the issue for me
 
Masoud Bagheri #:

I have a similar problem, do you find a solution?

Try what I mention above
Reason: