"Realtime-history matching" anomalies

Questions about MultiCharts and user contributed studies.
roesm
Posts: 37
Joined: 30 Sep 2011
Has thanked: 10 times
Been thanked: 5 times

"Realtime-history matching" anomalies

Postby roesm » 20 May 2015

I have a chart set up that has 24-hour 1-minute bars in data1 and regular session daily bars in data2. The regular session bars are have the "Build from minutes" box checked, so the values match exactly. I have some code running which continuously reports market status. This code uses both data1 and data2. In order for the code to work during the after-hours session, I need to have the "Realtime-history matching" box unchecked.

The problem I'm having is that while the "Realtime-history matching" box is unchecked, the data2 values are inconsistent during the regular session. When I first run the code, close[0] returns the closing price of the previous session, as it should. However, on subsequent bars, close[0] returns the close of the developing bar, and close[1] returns the closing price of the previous session. During after-hours, close[0] always returns the closing price of the previous session.

The code below illustrates the problem...
Code running during regular trading hours (CL):
if date = currentdate and time = currenttime then begin
print("c[0]: ", date, " ", time, " ", c[0] data2);
print("c[1]: ", date, " ", time, " ", c[1] data2);
end;

Realtime-history matching ON:
c[0]: 1150520.00 929.00 57.99 <= previous day's close
c[1]: 1150520.00 929.00 60.28
c[0]: 1150520.00 930.00 57.99 <= subsequent read, still ok
c[1]: 1150520.00 930.00 60.28

Realtime-history matching OFF:
c[0]: 1150520.00 930.00 57.99 <= 1st report is correct
c[1]: 1150520.00 930.00 60.28
c[0]: 1150520.00 931.00 58.93 <= subsequent reads get current close
c[1]: 1150520.00 931.00 57.99 <= prev day's close
My question is, is there some way to make the reporting consistent, or if not, is there a way for the code to get the status of the "Realtime history matching" flag, so I can work around this problem?
FYI, the scenario above is not covered in the MultiCharts wiki on Realtime-History Matching

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: "Realtime-history matching" anomalies

Postby Henry MultiСharts » 21 May 2015

Hello roesm,

Please study our Wiki section to learn how Realtime-History Matching works. Please also see the attached illustrations demonstrating how this option affects the calculation on two data series.
Attachments
How_rt_history_matching_works.zip
(290.42 KiB) Downloaded 248 times

roesm
Posts: 37
Joined: 30 Sep 2011
Has thanked: 10 times
Been thanked: 5 times

Re: "Realtime-history matching" anomalies

Postby roesm » 21 May 2015

So the answer is no to both questions?

roesm
Posts: 37
Joined: 30 Sep 2011
Has thanked: 10 times
Been thanked: 5 times

Re: "Realtime-history matching" anomalies

Postby roesm » 27 May 2015

This started when my code was behaving oddly and then I spent several hours constraining the problem, testing stuff and then writing up a detailed description of the issue. Then I get what looks like a canned response that doesn't address my questions. :-(

My workaround now is to switch Realtime-History Matching ON during RTH and OFF after hours. Kind of a pain because I'm tracking multiple markets.

Is there something I need to request in order to get a better solution?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: "Realtime-history matching" anomalies

Postby Henry MultiСharts » 28 May 2015

Hello roesm,

I apologize for the delay in responding. There is no way to get the status of the "Realtime history matching" flag in the code.

We have tested your case and have not not identified any issues with the values reported by the code (disregard "Realtime history matching" status) - all of the returned values are correct and expected.

In order to analyze your case in more details - please send us (support@multicharts.com) the following information:
- workspace you are using;
- in QuoteManager select the symbols you are using, make a right click on any of them->Export data->Export instruments (with data). Send us the QMD export file for analysis. If the file size is >10 mb please upload it to any file sharing hosting and send us the download link;
- in PowerLanguage editor->File->Export->Export with dependent functions the study you are using for replicating this case. Send us the study export file;
- specify the version and build number of MultiCharts you are running (in MultiCharts go to Help tab-> About);
- full sized screenshots with annotations demonstrating the issue;
- specify the values you have, why do you think they are incorrect, specify the values you expect to get;
- instructions for replicating it on our end.


Return to “MultiCharts”