Ticks vs. Q_TotalVolume discrepancy

Questions about MultiCharts and user contributed studies.
User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Ticks vs. Q_TotalVolume discrepancy

Postby JoshM » 11 Jul 2012

According to the help file for Ticks, Ticks returns "total volume for the current bar if Build Volume On is set to Trade Volume".

However, adding the following indicator to such a chart shows that Q_TotalVolume is missing ticks. (Or am I missing something?)

Code: Select all

Variables:
IntraBarPersist PrevVolume(0);

if (LastBarOnChart_s = True) then begin

Print(TimeNow, "Ticks: ", Ticks, " totalVolume: ", Q_TotalVolume,
IffString(Q_TotalVolume = PrevVolume, " <--- ", ""));

PrevVolume = Q_TotalVolume;
end;
Gives:

Code: Select all

11-07_15:07:31 Ticks: 139.00 totalVolume: 219780.00
11-07_15:07:44 Ticks: 149.00 totalVolume: 219790.00
11-07_15:07:50 Ticks: 153.00 totalVolume: 219794.00
11-07_15:08:09 Ticks: 14.00 totalVolume: 219808.00
11-07_15:08:09 Ticks: 84.00 totalVolume: 219894.00
11-07_15:08:10 Ticks: 86.00 totalVolume: 219897.00
11-07_15:08:10 Ticks: 100.00 totalVolume: 219897.00 <---
11-07_15:08:10 Ticks: 103.00 totalVolume: 219897.00 <---
11-07_15:08:10 Ticks: 106.00 totalVolume: 219900.00
11-07_15:08:10 Ticks: 109.00 totalVolume: 219913.00
11-07_15:08:10 Ticks: 119.00 totalVolume: 219913.00 <---
11-07_15:08:12 Ticks: 120.00 totalVolume: 219914.00
11-07_15:08:30 Ticks: 125.00 totalVolume: 219924.00
11-07_15:08:56 Ticks: 130.00 totalVolume: 220358.00
11-07_15:08:56 Ticks: 342.00 totalVolume: 220358.00 <---
11-07_15:08:56 Ticks: 343.00 totalVolume: 220358.00 <---
11-07_15:08:56 Ticks: 344.00 totalVolume: 220358.00 <---
11-07_15:08:56 Ticks: 518.00 totalVolume: 220358.00 <---
11-07_15:08:56 Ticks: 549.00 totalVolume: 220358.00 <---
11-07_15:08:56 Ticks: 564.00 totalVolume: 220358.00 <---
11-07_15:09:00 Ticks: 664.00 totalVolume: 220458.00
11-07_15:09:01 Ticks: 669.00 totalVolume: 220468.00
11-07_15:09:04 Ticks: 674.00 totalVolume: 220477.00
11-07_15:09:04 Ticks: 683.00 totalVolume: 220477.00 <---
11-07_15:09:10 Ticks: 687.00 totalVolume: 220481.00
As can be seen, if Ticks increments compared from the previous tick, Q_TotalVolume doesn't increment. Also, compared with the Ticks value, Q_TotalVolume is missing volume.

Since Q_TotalVolume returns the same value as the volume in the chart's Status Line, does that also mean the reported volume in the Status Line is incorrect?

Using MultiCharts Version 8.0 Release (Build 5605).

SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

Re: Ticks vs. Q_TotalVolume discrepancy

Postby SUPER » 11 Jul 2012

Bowlesj3, did a comprehensive study on missing tick some time back and it may provide some additional information: viewtopic.php?f=1&t=6877

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Ticks vs. Q_TotalVolume discrepancy

Postby JoshM » 12 Jul 2012

Bowlesj3, did a comprehensive study on missing tick some time back and it may provide some additional information: viewtopic.php?f=1&t=6877
Thanks Super. I don't know if it's related to the BarStatus, it doesn't seem so (at least, I don't see a reliable pattern):

Code: Select all

12-07_13:05:02 BarTime: 13:05:00 BarStatus: 1 Ticks: 683 TotalVolume: 432790
12-07_13:05:03 BarTime: 13:05:00 BarStatus: 2 Ticks: 683 TotalVolume: 432908
12-07_13:05:03 BarTime: 13:06:00 BarStatus: 0 Ticks: 32 TotalVolume: 432908 <---
12-07_13:05:03 BarTime: 13:06:00 BarStatus: 1 Ticks: 41 TotalVolume: 432908 <---
12-07_13:05:03 BarTime: 13:06:00 BarStatus: 1 Ticks: 55 TotalVolume: 432908 <---
12-07_13:05:03 BarTime: 13:06:00 BarStatus: 1 Ticks: 116 TotalVolume: 432908 <---
12-07_13:05:03 BarTime: 13:06:00 BarStatus: 1 Ticks: 117 TotalVolume: 432908 <---
12-07_13:05:03 BarTime: 13:06:00 BarStatus: 1 Ticks: 118 TotalVolume: 432908 <---
12-07_13:05:07 BarTime: 13:06:00 BarStatus: 1 Ticks: 119 TotalVolume: 432910
12-07_13:05:07 BarTime: 13:06:00 BarStatus: 1 Ticks: 120 TotalVolume: 432910 <---
12-07_13:05:07 BarTime: 13:06:00 BarStatus: 1 Ticks: 121 TotalVolume: 432912
12-07_13:05:07 BarTime: 13:06:00 BarStatus: 1 Ticks: 122 TotalVolume: 432916
12-07_13:05:07 BarTime: 13:06:00 BarStatus: 1 Ticks: 126 TotalVolume: 432916 <---
12-07_13:05:11 BarTime: 13:06:00 BarStatus: 1 Ticks: 128 TotalVolume: 432918
12-07_13:05:13 BarTime: 13:06:00 BarStatus: 1 Ticks: 129 TotalVolume: 432919
12-07_13:05:16 BarTime: 13:06:00 BarStatus: 1 Ticks: 130 TotalVolume: 432920
12-07_13:05:27 BarTime: 13:06:00 BarStatus: 1 Ticks: 131 TotalVolume: 432921
12-07_13:05:28 BarTime: 13:06:00 BarStatus: 1 Ticks: 206 TotalVolume: 432996
12-07_13:05:42 BarTime: 13:06:00 BarStatus: 1 Ticks: 211 TotalVolume: 433026
12-07_13:05:43 BarTime: 13:06:00 BarStatus: 1 Ticks: 236 TotalVolume: 433046
12-07_13:05:43 BarTime: 13:06:00 BarStatus: 1 Ticks: 256 TotalVolume: 433046 <---
12-07_13:05:46 BarTime: 13:06:00 BarStatus: 1 Ticks: 258 TotalVolume: 433048
12-07_13:05:46 BarTime: 13:06:00 BarStatus: 1 Ticks: 268 TotalVolume: 433058
12-07_13:05:47 BarTime: 13:06:00 BarStatus: 1 Ticks: 278 TotalVolume: 433178
12-07_13:05:47 BarTime: 13:06:00 BarStatus: 1 Ticks: 285 TotalVolume: 433178 <---
12-07_13:05:47 BarTime: 13:06:00 BarStatus: 1 Ticks: 292 TotalVolume: 433178 <---
12-07_13:05:47 BarTime: 13:06:00 BarStatus: 1 Ticks: 384 TotalVolume: 433178 <---
12-07_13:05:47 BarTime: 13:06:00 BarStatus: 1 Ticks: 385 TotalVolume: 433178 <---
12-07_13:05:47 BarTime: 13:06:00 BarStatus: 1 Ticks: 388 TotalVolume: 433178 <---
12-07_13:05:54 BarTime: 13:06:00 BarStatus: 1 Ticks: 561 TotalVolume: 433351
12-07_13:05:58 BarTime: 13:06:00 BarStatus: 1 Ticks: 571 TotalVolume: 433361
12-07_13:06:01 BarTime: 13:06:00 BarStatus: 2 Ticks: 571 TotalVolume: 433363
12-07_13:06:01 BarTime: 13:07:00 BarStatus: 0 Ticks: 2 TotalVolume: 433363 <---
12-07_13:06:08 BarTime: 13:07:00 BarStatus: 1 Ticks: 6 TotalVolume: 433367
12-07_13:06:08 BarTime: 13:07:00 BarStatus: 1 Ticks: 7 TotalVolume: 433368
12-07_13:06:20 BarTime: 13:07:00 BarStatus: 1 Ticks: 9 TotalVolume: 433370
12-07_13:06:25 BarTime: 13:07:00 BarStatus: 1 Ticks: 12 TotalVolume: 433373
12-07_13:06:30 BarTime: 13:07:00 BarStatus: 1 Ticks: 13 TotalVolume: 433374
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 313 TotalVolume: 433886
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 320 TotalVolume: 433886 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 327 TotalVolume: 433886 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 349 TotalVolume: 433886 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 352 TotalVolume: 433886 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 478 TotalVolume: 433886 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 507 TotalVolume: 433886 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 514 TotalVolume: 433886 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 521 TotalVolume: 433886 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 525 TotalVolume: 433886 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 530 TotalVolume: 433896
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 535 TotalVolume: 433989
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 547 TotalVolume: 433989 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 549 TotalVolume: 433989 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 556 TotalVolume: 433989 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 563 TotalVolume: 433989 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 613 TotalVolume: 433989 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 619 TotalVolume: 433989 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 621 TotalVolume: 433989 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 625 TotalVolume: 433989 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 626 TotalVolume: 433989 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 628 TotalVolume: 433989 <---
12-07_13:06:38 BarTime: 13:07:00 BarStatus: 1 Ticks: 647 TotalVolume: 434039
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 656 TotalVolume: 434087
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 660 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 678 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 679 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 683 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 686 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 687 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 694 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 695 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 696 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 701 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 703 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 714 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 725 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 726 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 736 TotalVolume: 434100
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 738 TotalVolume: 434100 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 739 TotalVolume: 434100 <---

Code: Select all

Variables:
IntraBarPersist PrevVolume(0);

if (LastBarOnChart_s = True) then begin

Print(TimeNow,
" BarTime: ", FormatTime("HH:mm:ss", ELTimeToDateTime_s(Time_s)),
" BarStatus: ", NumToStr(BarStatus(1), 0),
" Ticks: ", NumToStr(Ticks, 0),
" TotalVolume: ", NumToStr(Q_TotalVolume, 0),
IffString(Q_TotalVolume = PrevVolume, " <--- ", ""));

PrevVolume = Q_TotalVolume;
end;

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Re: Ticks vs. Q_TotalVolume discrepancy

Postby bowlesj3 » 13 Jul 2012

These are my notes on this. Last time I checked it the issue was largely fixed but there were a few missing ticks. I was not checking against volume. This was all done before the check box to skip ticks that have the same price (which defaults to skipping the ticks which I think should be the other way around personally).


NOTE: this project management entry may already cover the issue and it may be fixed.
https://www.multicharts.com/pm/viewissu ... _no=MC-155

Ticks Missing Test using TS & MC with GV Data Sharing.
viewtopic.php?f=1&t=6919&hilit=missing+execution

New Subject: Studies not getting executed on every tick.
viewtopic.php?f=1&t=6877&hilit=missing+execution


Bob's Why I don't trust "IntraBarPersist"
viewtopic.php?f=1&t=6307

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Ticks vs. Q_TotalVolume discrepancy

Postby JoshM » 17 Jul 2012

Thanks for your links and further information John. However, I'm not sure this problem is related to skipping ticks. If it were, wouldn't we expect that the Q_TotalVolume increments without the Print statement being triggered by the indicator? That would indicate that a tick is missed, since the daily volume is incremented without a tick being received/processed.

For example, the output from the post earlier in this thread is

Code: Select all

12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 678 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 679 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 683 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 686 TotalVolume: 434087 <---
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 687 TotalVolume: 434087 <---
But I think that, if ticks are missed, we'd probably see something like this (where TotalVolume increments more than the trades received):

Code: Select all

12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 678 TotalVolume: 434087
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 679 TotalVolume: 434120
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 683 TotalVolume: 434150
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 686 TotalVolume: 434195
12-07_13:06:41 BarTime: 13:07:00 BarStatus: 1 Ticks: 687 TotalVolume: 435120
(But I'm not sure if this reasoning is correct).

---------------

MC support, can you comment on this thread? It's documented enough and also old enough (almost a week) to warrant a response from your side. Thanks.

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

Re: Ticks vs. Q_TotalVolume discrepancy

Postby Henry MultiСharts » 18 Jul 2012

Josh, that is not guaranteed that all ticks from the chart would be reflected in the status line volume. Chart volume should be compared to the vendor's platform chart volume, status line volume should be compared to the the vendor's platform status line volume.
If you need precise tick volume information-you need to get it from the chart.

roslja
Posts: 3
Joined: 13 Sep 2012
Has thanked: 3 times

Re: Ticks vs. Q_TotalVolume discrepancy

Postby roslja » 12 Oct 2012

I have faced the same problem. It looks like Q_TotalVolume (DailyVolume) gets updated only once every second. It does not tick at all. Your prints confirm the same.
Tested with IQFeed.

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

Re: Ticks vs. Q_TotalVolume discrepancy

Postby Henry MultiСharts » 15 Oct 2012

Q_TotalVolume (DailyVolume) updates are received from the datafeed with the freguency they are provided by the datafeed.


Return to “MultiCharts”