Significant Performance Discrepancy Between Backtesting and Live Trading - page 4

 
err3vi #: This is the log I get after clearing the cache and starting a backtest in visual mode.  The backtest is performed using historical data from yesterday. Yesterday was a very bad day for the live performance of the algorithm. Nonetheless, the algorithm performs exceptionally well in this test.

I don't see any tick data being downloaded and processed in that log report. That back-test was not for tick based modelling as you claimed before.

In your post #8, you imply that your EA only depends on OHLC data, and I quote "... the strategy is quite straightforward, relying on immediate (OPEN, CLOSE) ..."

Yet, in your post #19, you state that you only use tick quote prices, and I quote "... I do not use time-based frames (M1, M5, etc.) for trading. Instead, I trade on every tick ..."

You seem to be contradicting yourself.

Either way, until you fully understand how tick data is collected (and from where) and processed by the Strategy Tester, and how the modelling works, you will forever be unable to fully appreciate the differences between live trading and your back-test results.

 
err3vi #: However, my question is: what kind of processing does MQL apply to live data before storing it as historical data?

I have already answered that in multiple posts. Historical data is just a stored copy of the live data. However, it should be the brokers data and not that provided by MetaQuotes from their beta-testing demo accounts.

err3vi #: My goal is to replicate this processing in real-time to better align my live performance with backtesting results.

That is not the correct way to resolve the issue. You don't replicate the "testing" environment. You replicate the "live" environment in the testing process.

To do that you have to ...

  1. Make sure that the source data is valid and of high quality, with the least amount of gaps and mismatches.
  2. You have to improve your strategy logic so that it adapts to different conditions.
A easy way to test for the second point, is to have your strategy be able to work well on any symbol, as each symbol will provided different behaviour for your EA to adapt to. This can be considered a "poor man's" way of carrying out "Monte Carlo" simulations and it is a very effective method for testing your EA's robustness.
 
Fernando Carreiro #:

I don't see any tick data being downloaded and processed in that log report. That back-test was not for tick based modelling as you claimed before.

In your post #8, you imply that your EA only depends on OHLC data, and I quote "... the strategy is quite straightforward, relying on immediate (OPEN, CLOSE) ..."

Yet, in your post #19, you state that you only use tick quote prices, and I quote "... I do not use time-based frames (M1, M5, etc.) for trading. Instead, I trade on every tick ..."

You seem to be contradicting yourself.

Either way, until you fully understand how tick data is collected (and from where) and processed by the Strategy Tester, and how the modelling works, you will forever be unable to fully appreciate the differences between live trading and your back-test results.

Sorry, I’m new to this field. I simply trade on every tick using SymbolInfoDouble(...) to obtain tick prices, without relying on OHLC bars from specific timeframes (M1, M5, etc.).

However, I don't think this detail is particularly relevant to my question. Do you know how MetaQuotes collects the historical data provided through the MT5 platform? Are these data processed in any way before being delivered?

 
err3vi #: However, I don't think this detail is particularly relevant to my question. Do you know how MetaQuotes collects the historical data provided through the MT5 platform? Are these data processed in any way before being delivered?
It's very frustrating being asked the same questions for which answers were already given multiple times, and you just keep ignoring.
 
err3vi #:

Sorry, I’m new to this field. I simply trade on every tick using SymbolInfoDouble(...) to obtain tick prices, without relying on OHLC bars from specific timeframes (M1, M5, etc.).

However, I don't think this detail is particularly relevant to my question. Do you know how MetaQuotes collects the historical data provided through the MT5 platform? Are these data processed in any way before being delivered?

If by "the process" you are referring to the simulation then you should not use it . Here is why.

If you have no ticks the tester will querry for the lowest available bar with data which contains the finalized state of a candle formation.

So if your simulated time is supposed to be 18:00 and the tester finds a formed bar ending at 18:01 , it will read the end prices (high,low,close) of that bar in order to simulate tick behavior.

However if you were back then at the simulated point in time trading ,you would not have access to the end prices of the bar ending at 18:01.

Therefore the "processing" done in this case would be impossible to use on a live setting.

Its like trying to bet on a soccer match using the statistics of the match at the end of the match. Impossible.

 
why ask questions if you are not going to listen/read from the experts. Fernando has been using strategy tester for years. How many years, Fernando?
 
Fernando Carreiro #:
It's very frustrating being asked the same questions for which answers were already given multiple times, and you just keep ignoring.

Sorry, I just wanted a more explicit answer to ensure I fully understood.

My broker initially told me that the data they provide are exact recordings of raw tick events without any processing. However, in a later response, they stated that MetaQuotes is responsible for historical data and suggested I contact MetaQuotes for clarification.

If I understand correctly, you lean towards their first explanation. But if historical data are truly accurate recordings of raw tick events, why does my EA perform so differently on historical data compared to live data?

Slippage (latency, market volatility, etc.), which I can even simulate in backtesting, doesn't seem to fully explain the discrepancy I’m observing.

However, I sincerely appreciate your responses. If you have any further information or links on how data are collected and delivered, I would be grateful to learn more.

 
err3vi #: Sorry, I just wanted a more explicit answer to ensure I fully understood.
  1. In post #9, the user @Michael Charles Schefe requested that you show your test settings, yet you ignored the request. So currently we have no ideia what you are doing, and for all we know you are using the Strategy Tester incorrectly.
  2. In post #22, and post #29, you supplied partial log output, but in both cases there was no reference to real tick data being processed by the Strategy Tester. All it references is M1 bar data, and no tick data what-so-ever.


This leads me to the conclude, that in your test settings, you are not even using the correct modelling option of "Every tick based on real ticks". At best, you are probably using the "Every tick" which is simply simulated virtual ticks, which explains why you noticed that the data seemed "smooth".

Your words have been always about about real tick data, but so far all evidence points to you using at the Strategy Tester incorrectly, with the wrong modelling method, based either on M1 data or at most, simulated virtual ticks.

This means that this entire discussion has been thus far, moot. You have not been using real tick data at all.

 

Confirmed—you have been using the incorrect modelling method ..."Every tick" and not "Every tick based on real ticks"

CS      0       16:43:40.381    Tester  FRA40,M1 (FusionMarkets-Demo): every tick generating

Had it been real ticks, it would have been like this ...

CS      0       22:16:08.209    Tester  EURUSD,H1 (RoboForex-Pro): generating based on real ticks

You have been leading us all on a wild goose chase.

You have been using simulated virtual ticks, not broker supplied real tick data ...

Articles

The Fundamentals of Testing in MetaTrader 5

MetaQuotes, 2011.05.18 13:16

What are the differences between the three modes of testing in MetaTrader 5, and what should be particularly looked for? How does the testing of an EA, trading simultaneously on multiple instruments, take place? When and how are the indicator values calculated during testing, and how are the events handled? How to synchronize the bars from different instruments during testing in an "open prices only" mode? This article aims to provide answers to these and many other questions.
EDIT: Also, you have been showing us the wrong logs. The logs you have shown are from the MetaTester Agent and not the main Journal log from the Strategy Tester which shows the real processing of the historic data. Next time, please show the correct logs so that we are not let astray.
 
Fernando Carreiro #:

Confirmed—you have been using the incorrect modelling method ..."Every tick" and not "Every tick based on real ticks"

Had it been real ticks, it would have been like this ...

You have been leading us all on a wild goose chase.

You have been using simulated virtual ticks, not broker supplied real tick data ...

EDIT: Also, you have been showing us the wrong logs. The logs you have shown are from the MetaTester Agent and not the main Journal log from the Strategy Tester which shows the real processing of the historic data. Next time, please show the correct logs so that we are not let astray.

Thank you very much, Fernando, and all the other contributors.

Apologies for any imprecisions on my part—the MT5 platform is quite complex and intricate. However, at the end of the day, we succeeded. This is exactly the information I was looking for.