Calculation difference wrt realtime-history matching  [SOLVED]

Questions about MultiCharts and user contributed studies.
scotthkao
Posts: 31
Joined: 19 Feb 2014
Has thanked: 14 times

Calculation difference wrt realtime-history matching

Postby scotthkao » 28 Jun 2016

http://www.multicharts.com/trading-soft ... y_Matching

The sentence as follows is from the above link:
"When using several data series calculation on historical data may differ from real-time calculation Realtime-history matching option makes historical calculation results closer to real-time."

If I use multiple data series on the same symbol, why can calculation on historical data differ from real-time calculation?

Or is it only occurs with multiple data series of different symbols?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Calculation difference wrt realtime-history matching

Postby TJ » 28 Jun 2016

http://www.multicharts.com/trading-soft ... y_Matching

The sentence as follows is from the above link:
"When using several data series calculation on historical data may differ from real-time calculation Realtime-history matching option makes historical calculation results closer to real-time."

If I use multiple data series on the same symbol, why can calculation on historical data differ from real-time calculation?

Or is it only occurs with multiple data series of different symbols?
Have you read the whole article?

scotthkao
Posts: 31
Joined: 19 Feb 2014
Has thanked: 14 times

Re: Calculation difference wrt realtime-history matching

Postby scotthkao » 28 Jun 2016

Thanks for your rely!

Yes, I have.

The main points with respect to enabled realtime-history matching option are:
(1)With realtime-history matching option enabled,
the "COMPLETED" bar (not the latest uncompleted bar) of the auxiliary data series is used.
(2)With realtime-history matching option enabled,
the main data series (even with new ticks) will not be calculated
before new ticks come in on the auxiliary data series.

So, when I use the main data series for ES 1-minute bar and the auxiliary data series for ES 5-minute bar, why can calculation on historical data differ from real-time calculation?
Precisely put, why can the signals triggered by the real-time trading calculation differ from the signals simulated by backtest?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Calculation difference wrt realtime-history matching

Postby TJ » 28 Jun 2016

Thanks for your rely!

... why can calculation on historical data differ from real-time calculation?
Precisely put, why can the signals triggered by the real-time trading calculation differ from the signals simulated by backtest?
Because...

as explained in the examples.

scotthkao
Posts: 31
Joined: 19 Feb 2014
Has thanked: 14 times

Re: Calculation difference wrt realtime-history matching

Postby scotthkao » 28 Jun 2016

Example 1:
“Real-Time History Matching” is turned off (the box is cleared), the data series 1 continues updating, the data series 2 stopped updating:
a script will be calculated on data series 1 using the updating values from data series 1 and the latest static available values from data series 2.

Do you mean that the latest static available values from data series 2 can be different in real-time trading and back test?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Calculation difference wrt realtime-history matching  [SOLVED]

Postby TJ » 28 Jun 2016

Example 1:
::

Do you mean that the latest static available values from data series 2 can be different in real-time trading and back test?
That's exactly what is in the real world.

Many scenarios can cause the data to not be in sync during backtest.


You can do a search in this forum for "realtime history matching" to see some real life situations.

evdl
Posts: 401
Joined: 19 Jan 2011
Location: Netherlands
Has thanked: 85 times
Been thanked: 124 times

Re: Calculation difference wrt realtime-history matching

Postby evdl » 29 Jun 2016

Hello Scotthkao,

Just as TJ says, there are many scenarios that can cause sync issues. Some expected and some unexpected within MC itself.

Hopefully to save you some time, check out these links:

These are about how MC is working with multiple datastreams. One caveat is that MC with multiple datastreams takes the future close of unfinished bars on other datastreams than data1 with backtesting. Depending on the RTHM setting. With barstatus in your code it is possible to deal with this sometimes. But also you have to be aware of functions that will use dataN. These will also use the unfinished bars and you have to rewrite the functions also to get the backtest results as close to realtime as possible.

http://www.multicharts.com/discussion/v ... 32#p115466

example of a barstatus to use:
http://www.multicharts.com/discussion/v ... 508#p99210

There are more posts on the forum about this.

scotthkao
Posts: 31
Joined: 19 Feb 2014
Has thanked: 14 times

Re: Calculation difference wrt realtime-history matching

Postby scotthkao » 30 Jun 2016

Thanks for your reply!

Do you mean dataN by datastream?
Or do you mean a data feed that provides dataN?

evdl
Posts: 401
Joined: 19 Jan 2011
Location: Netherlands
Has thanked: 85 times
Been thanked: 124 times

Re: Calculation difference wrt realtime-history matching

Postby evdl » 30 Jun 2016

The N in dataN is short for number of the datastream 2 or 3 or 4 etc. In example data2, data3, data4.

scotthkao
Posts: 31
Joined: 19 Feb 2014
Has thanked: 14 times

Re: Calculation difference wrt realtime-history matching

Postby scotthkao » 30 Jun 2016

Your explanation is very clear and well understood.

Thank you!


Return to “MultiCharts”