Metatrader Backtest (every tick) and Real account (ECN account) not giving me the same results

 
phil09:

hi,

somebody have some idea how can i resolve this problem?

phil

There may be no problem,  you will always see some variability,  but you need to give more details on the size of the perceived problem.  Are you testing the same date range or different date ranges ?  is the spread similar or has it changed significantly ?  etc, etc
 

Hi Phil,

You'll never see the same results and this variance will also depend upon the trading system itself. You must remember that the data provided by the brokers only goes down to a granularity of one minute - from there, MT5 basically tries and works out what would have happened during that minute with some clever algorithms. However, a lot can happen in one minute and these algorithms can only do so much...

And things change again when going from demo to live. For instance, in a live environment, SL's are only indicative levels - i.e. if there's liquidity at the SL price, you'll be stopped out there - otherwise, you'll be stopped out at the next available price. And if the broker happens to widen the spread due to some unexpected news event etc and your stop happens to "be in the way".... You might not think all this would make so much of a difference but I've had some stops slip by up to 500 points in a live environment... This can also really become a problem if you keep trades going over weekends.

So what all this basically means is make sure that when you go live, always run your Expert for a month or two with a small amount of cash first. Then compare those month's trades with a simulation run of that Expert over that same month or two of data. This should give you a good idea as to where the weaknesses (that can't be found using a simulator) in your Expert are.

Oh and re: the difference in variance. I think you'll find that the variance is a lot higher with short term strategies as opposed to long term ones. This again is basically due to the limitations of the simulator, coupled with the number of orders placed and resulting slippage of those orders in different market conditions.

 

Hi guys, i just read your post and this just happen me yesterday.

At the exact time:

                      Live account open long 1.31958

Live account strategy tester open long 1.31950


Is this also a common problem for you?

 
olzonpon:

Hi guys, i just read your post and this just happen me yesterday.

At the exact time:

                      Live account open long 1.31958

Live account strategy tester open long 1.31950


Is this also a common problem for you?

As very well explained by Cowil, this is not a problem, this is how it works.
 

You may get the same results if MT kept a history file of data to be used for backtesting after several tries. However, It depends weather your EA depends on ticks or not. MT is simulating the ticks but It is not accurate and will never simulate it as reallity. This is why you need to go  to "Afterwalk" strategy testing on demo account.

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Account Properties - Documentation on MQL5