MT4 flaky giving different backtest results with no changes - page 3

 
15011974:

WHRoeder, wrote "Are you pressing the start button on both machines at exactly the same time and the CURRENT spread affects the back test".

My backtest will not process ticks dated and time stamped before midnight of my start date 2010-03-11 or after 00:00:00 of my end date of 2011-03-11.

Therefore, any CURRENT ticks should not affect the backtest nor should it matter what day or time I do backtesting as that would defeat the purpose of backtesting. Please use some logic in your answers.

Bill H.

But the !!CURRENT!! spread at the moment you press start is used during the !!WHOLE!! tested period. MT4 stores only !!BID!! prices.
 
zzuegg:
But the !!CURRENT!! spread at the moment you press start is used during the !!WHOLE!! tested period. MT4 stores only !!BID!! prices.


Go to tools --> options ---> check enable proxi server box --> in server put 1.1.1.1

restart your trading platform. Make sure the connection status(the little thingy at the right lower corner that looks like two triangles opposed) is red for in and out comunication.

That will cut comunication with your broker and all the historical data you use in your back testing will not be affected by the spread your broker keep changing all the time.

When you are sure to go live, just un-check the proxy and re-start again.

Happy trading

 

also quite important, from here:

https://www.mql5.com/en/articles/1490

Why does my EA see wrong prices of a higher timeframe, though I have imported my own deep history?

For modelling the tester uses data from fxt-file. Usually this fxt-file is generated by the tester on the basis of the available history in hst-files. But if the prepared FXT-file was generated in another time-zone, or on the other broker's quotes (or prepared by yourself - the format of fxt-files is open), and the data in this fxt-file does not correspond with the data in the existing hst-files - different errors may occur. Usually this may happen after a manual import and reconversion of quotes from side sources.

For example, the EA calls the function iOpen(NULL, PERIOD_D1,1) or iHighest(NULL, PERIOD_D1,MODE_HIGH,20,1). iOpen(NULL, PERIOD_D1,1) requests the yesterday open price on the same symbol, on which the testing is carried. iHighest(NULL,PERIOD_D1, MODE_HIGH,20,1) gives the index of the daily bar with the largest value of High within 20 bars starting from the first one (of yesterday). Both functions in the tester are calculated on the basis of the data from hst-files.

And if the fxt-file does not correspond with the history in hst-files (in this example data on EURUSD1440.hst), the prices in the tester will be absolutely different. We have two different histories - the one is in the tester, the other one is in the file EURUSD*hst.

Important: a correct testing requires correspondence between data in fxt- and hst- files. It is undesirable to use patch import from side sources. Use standard History Center with minute history of quotes from 1999. Minute quotes from the History Center are automatically recalculated onto all timeframes and are converted into the time-zone of the current account which eliminates "time shifting".

 
brewmanz:
You do not understand how historical information is stored. It is Bid price only. When you run the backtest, the tester needs to generate both Bid AND Ask price. It needs a spread value to do that, and it uses the CURRENT spread to work out the HISTORICAL spread for each tick as it works its way through the data

Brewmanz & WHRoeder - I cannot thank you enough. I was getting on to something and ran one backtest which gave me decent profits. I was thrilled. I ran it on Saturday and it depleted my account. I was shocked and could not sleep last night. This monring I came across this thread, tried it and am delighted again :-)

I'll also add a condition in my EA to not trade if the spread is too high.

 
I'd like to continue this discussion if possible since I also experience the same thing today. I asked pepperstone and they said the issue could be a result of liquidity especially when using live account the liquidity is vary and it does take into account, however this still does not explain that my backtest result still vary on each test using demo account. Is there any solution to this ? how do I know which test result is reliable ? 
 
Timotius Mogot #:

Hello Timotius, have you found a solution since time..?

Thomas

Reason: