Custom future Data stored in db has changed?  [SOLVED]

Questions about MultiCharts and user contributed studies.
PK1
Posts: 102
Joined: 12 Jun 2011
Has thanked: 42 times
Been thanked: 12 times

Custom future Data stored in db has changed?

Postby PK1 » 27 Jun 2022

Hello,

via indicator I export data for different futures and stocks regularly into CSV-Files. For a while I found out that the exported data from exports for my custom future ES# already days later differs in many cases. OHLC is different, only Volume stays the same.

The MC data exporter isn't exporting custom futures but the aggregated data is there and can be used for backtesting, etc. So that shouldn't be a problem.

Any reason why the data doesn't stay the same?

User avatar
Kate MultiCharts
Posts: 575
Joined: 21 Oct 2020
Has thanked: 7 times
Been thanked: 144 times

Re: Custom future Data stored in db has changed?

Postby Kate MultiCharts » 30 Jun 2022

Hello PK1,

Please describe the issue in more detail. What steps do you take, which instruments do you compare, how do you compare the values? Please attach some screenshots to illustrate.

PK1
Posts: 102
Joined: 12 Jun 2011
Has thanked: 42 times
Been thanked: 12 times

Re: Custom future Data stored in db has changed?

Postby PK1 » 04 Jul 2022

Hello PK1,

Please describe the issue in more detail. What steps do you take, which instruments do you compare, how do you compare the values? Please attach some screenshots to illustrate.
Thx Kate.

Comparing different exports it looks like it's exactly 3 Points with ES# (like 4150 -> 4153) after I compared H1 and D1-Export.
Happened for some custom contracts (for future /ES /RTY /NQ) but not Indices like SPX, RUT or stocks. H1-Example for ES# is attached, same result is on time frame D1 and minute time frames. So I use the data from custom contracts (not the local symbols like ESU2, ESZ2). The custom contract is named as ES# in my case. First screenshot shows that the volume stays the same, so there's no accidental shift in the time series. I was checking my indicator thoroughly but found nothing which could cause the data-difference, especially as things are fine with stocks and indices. So the only thing left for the cause is MC which is handing the data over to the indicator.

My export is via indicator, I wrote years ago, just writing Open, High, Low, Close out (plus additional data). The attached code for OHLC is unchanged since years, only some volume and symbol things changed recently. Thatswhy I wonder how data written out can be different for custom contracts and not all the other data written out. Worked perfectly over the years until I've seen in my database (where I import those data) that due to an incomplete primary key data for the same day / hour but different values came in.

So my overall workflow is quite simple, open MC-Workspace, containing different windows, each has exactly one symbol and one indicator (the export indicator) and writing data for each bar shown into a file. The CSV then I can use for some stats with R for example.

For comparing I used the exported CSV-Files as in the screenshot, comparing it manually or via Excel as in the 3rd screenshot. Thee you can see data from 20220614 and 20220630 and on the very right the diff for OHCL Vol. I was thinking about possible future-contract-adjustments / dividend-things done somewhere causing the difference ... but couldn't see if this is really done somewhere in MC. Regarding the concatenation of the single localsymbols (ESH2 + ESM2) into the custom contract ES# automatically done by MC the data for February shouldn't change but it does as in the screenshot.

I can't see what MC is storing but seeing that MC doesn't export custom contracts and also often is reloading older data (which is def. already loaded) when trying to show a custom contract it looks like MC is recalculating each bar again even for years back when it comes to custom contracts. My indicator is just requesting those data with different result as seen in the third screenshot.

Thanks

Edit: For now I can't tell whether the diff is really only those 3 Pts and the same for each bar (wouldn't be a big deal then) like in the attached check via Excel, can be different the next check. So I'll check exports and see whether it's really like this or if there's some arbitrary part.
Attachments
MC3.png
(189.6 KiB) Not downloaded yet
MC2.png
(10.75 KiB) Not downloaded yet
MC.png
(64.4 KiB) Not downloaded yet

User avatar
Kate MultiCharts
Posts: 575
Joined: 21 Oct 2020
Has thanked: 7 times
Been thanked: 144 times

Re: Custom future Data stored in db has changed?  [SOLVED]

Postby Kate MultiCharts » 11 Jul 2022

PK1,

Most likely, you have the back adjustment enabled in your custom futures settings. After each rollover all the previous contracts’ prices are modified according to the adjustment settings. You could try disabling them: double-click your custom futures in QuoteManager -> Custom Futures tab -> select “No Adjustment” in the Back Adjustment Mode drop-down box.
More info here.

PK1
Posts: 102
Joined: 12 Jun 2011
Has thanked: 42 times
Been thanked: 12 times

Re: Custom future Data stored in db has changed?

Postby PK1 » 11 Jul 2022

PK1,

Most likely, you have the back adjustment enabled in your custom futures settings. After each rollover all the previous contracts’ prices are modified according to the adjustment settings. You could try disabling them: double-click your custom futures in QuoteManager -> Custom Futures tab -> select “No Adjustment” in the Back Adjustment Mode drop-down box.
More info here.
Thx, I didn't know this can be configured, I changed it to "No adjustment". Not yet checked but I guess that was point.


Return to “MultiCharts”