Phantom ticks and processing latency

Questions about MultiCharts .NET and user contributed studies.
TicksCollecor
Posts: 8
Joined: 22 Jan 2014
Has thanked: 1 time

Phantom ticks and processing latency

Postby TicksCollecor » 04 Apr 2014

1.
I'm using Rithmic with SC (SC) and Multicharts (MC) from Israel.
I wanted to check latency issues, which I thought originated from the USA stream compared to the EU stream. at first I thought that the USA stream is slower than the EU stream (which btw is still not available in MC), but found that the latency is all generated inside MC due to slow processing of the platform.

SC supports the regular USA stream, the Aggregated USA stream and the EU stream from Ireland.
I wrote an indicator in MC that compares Rithmic's timestamp (i.e. when the msg was received by Rithmic - from Globex - in Aurora) to my local time to find the real life latency.
Just to be clear, I wrote my own NTP client that keeps my PC at +/- 2 millisecond and less from real time.
Connecting from Israel, my ping to Rithmic's servers is about 165ms-170ms. this translates to 85ms per side. obviously I expected to find that I receive my data with a latency of 85-90 ms but the MC study "Aurora timestamp minus Local timestamp" showed I have a latency going from 130ms/140ms to 300ms/350ms at all times.
Over all 230ms IN AVERAGE..........
In times of fast market, MC shows latency of even 800ms and 1200ms!
And that's just for the trip from Aurota to Tel Aviv which should take less than 90ms.

To make a long story short:
All this extra latency is generated inside MC.
When comparing timestamps in SC I get latency from 85ms-120ms while in MC I get 160ms-300ms.
And at times of fast market when SC report a momentary latency of 300ms-500ms... MC reports 800ms-1200ms and sometimes even more.
Putting an SC chart next to an MC chart (both using the same Rithmic USA feed) you can see in naked eye how the last price and bars in the MC chart lagging behind SC.
Also, doing a high speed video I found that SC prints the study histogram instantaneously when a new price bar opens in the chart... while in MC when a new price bar is added to the chart, at first it moves the study histogram to the left (to make place for a new bar), than there is a delay and after some time MC actually prints the new study bars.

Having slow graphics is one thing, its a real problem you should address, but it should at least have no effect on when you actually calculate studies. this is a major issue.



2.
Moving to the second problem.
When doing all the above tests, I used charts of Crude Oil which is much less liquid than ES or ZN. I used 1 Tick bar charts.
I don't know how to say it, but MC prints lots of phantom trades (picture attached).
Having the MC chart next to an SC chart, both fed from Rithmic USA stream showing CLK4 data at 1 Tick, I saw that MC from time to time prints more bars than SC. that's all in real time.
For comparison I loaded another SC instance, this time it loaded the data as backfill from Optimus Futures servers... and it matched the prints in the real time SC instance.
On top of that I opened a third SC instance, this time I loaded SC's own backfill which comes from BarChart... and this one also showed tick by tick the same numbers of bars as in the previous SC instances (real time Rithmic USA and Optimus Futures backfill).

In the picture it shows CLK4 at 7:58:25 to 7:59:30 in Chicago time.
On top is the MC prints and bottom is the SC prints.
Attachments
Phantom Ticks in MC small.png
(67.93 KiB) Downloaded 733 times

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

Re: Phantom ticks and processing latency

Postby Henry MultiСharts » 07 Apr 2014

Hello TicksCollecor,

That is possible to manually specify the Rithmic connection settings to connect to the particular server. Since MultiCharts 8.8 Release 3 (8968/8969) the connection settings to different servers are built-in.

We have tested the connection on our end and there is no data mismatch and/or delay between MultiCharts and Rithimc Trader. Please make sure you are running the latest version of MultiCharts. Disable the anti-virus and firewall you have, as well as the other tools that are tracing the application behavior, restart MultiCharts after that. Compare MultiCharts and Rithmic Trader. Can you see any data difference or delay? Can you see data queue in MultiCharts ( if 0q/0s counter in the bottom right corner changes to any numbers)?
Attachments
!Ritmic-vs-MC.png
(145.69 KiB) Downloaded 741 times

TicksCollecor
Posts: 8
Joined: 22 Jan 2014
Has thanked: 1 time

Re: Phantom ticks and processing latency

Postby TicksCollecor » 07 Apr 2014

Hi Henry,

I started asking for the Rithmic connection info almost two months ago, from you guys, from Optimus and directly from Rithmic... no one came thru.
I'm doing my test on the MC SE 64bit which still at version 8.8.8590 from two months ago.
Can you please make sure MC SE version will get updated?

Now,as for the delay.
What you show in the pic is that MC reports the **Rithmic** timestamp just the same as R|Trader reports the **Rithmic** time stamp.
Of course they are the same.... its the same timestamp :-)

To see the latency you need to do this:
Latency = "Time Of Arrival" - "Time O fDispatch"
Time Of Dispatch is Rithmic's time stamp (as in your pic)
Time Of Arrival is your own PC timestamp

For your local time >>> very Important:
Either you need your own Time Source (Radio/GPS) or access to Stratum 1 NTP server that will allow you to sync every minute (or less if your PC quartz is really bad).
Just using something like the Meinberg NTP client is not good enough for trading, since it will let your time drift +/- 100ms and even +/- 150ms.
I had to write my own NTP client to reach +/- 2ms drift by compensating for my own pc quartz.

With that, I compared my Local PC timestamps on MC (Multicharts) and SC (SC) using the same Rithmic Aurora feed.
Since the feed on both platforms is the same, in absolute perfect world I should see the same latency, right?... which in my case should be about 85ms... the half round trip of 170ms.

In practice, when the market is not frenzy, SC reports latency of 85-100ms while MC reports latency of 140-250ms.
When some news hit, and market moves to hyper trading, on some spikes SC reports latency of 250-400ms while MC reports 700-1200ms.

Since the feed is the same, this could only come from either slower processing inside MC and/or actually calculating studies very late. either way.... the latency is internal to MC.


* I'll post after the session about the phantom ticks

TicksCollecor
Posts: 8
Joined: 22 Jan 2014
Has thanked: 1 time

Re: Phantom ticks and processing latency

Postby TicksCollecor » 09 Apr 2014

Henry,

I made you a short video to show the latency issue in real time.
The video was captured on high frame rate and slowed down to quarter speed so it will be easier to see what's going on.

On the left side is SC and on the right is Multicharts.
* Both use the same Rithmic USA feed
* Both are 1 Tick bar charts
* Both show just the study/indicator area where the study plots the milliseconds part of the local pc time (local arrival time, not Rithmic's time)

What you can see is that MC always lagging, sometimes by 50ms and sometimes by 150ms.
Another thing you can see is what I described in the first post, that SC plots the new study bars instantaneously while MC first scrolls the bars to the left, to make space for the new bars, than pauses for some time, and then plots the new bars.

Maybe you calculate the studies very late into the process?
Maybe the screen rendering is the blame?
I don't know why, but here it is.
Attachments
MC SC.rar
(153.94 KiB) Downloaded 109 times

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

Re: Phantom ticks and processing latency

Postby Henry MultiСharts » 09 Apr 2014

TicksCollecor, is "Update on every tick" turned on for your indicator?
Is "Skip identical ticks" turned off for this indicator?
Please check it in Format->Study->Format->Properties.

TicksCollecor
Posts: 8
Joined: 22 Jan 2014
Has thanked: 1 time

Re: Phantom ticks and processing latency

Postby TicksCollecor » 09 Apr 2014

They are both on.

Any news on updating MC SE?
Its really urgent...

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

Re: Phantom ticks and processing latency

Postby Henry MultiСharts » 09 Apr 2014

Please turn off the option "Skip identical ticks" and let me know how your indicator works with it.

TicksCollecor
Posts: 8
Joined: 22 Jan 2014
Has thanked: 1 time

Re: Phantom ticks and processing latency

Postby TicksCollecor » 09 Apr 2014

Works the same way.
MC Lagging and the "scroll/pause/draw" for new bars still there.

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

Re: Phantom ticks and processing latency

Postby Henry MultiСharts » 15 Apr 2014

TicksCollecor, which deployment are you currently using for replicating this behavior?
Are you using a live or a demo account?

TicksCollecor
Posts: 8
Joined: 22 Jan 2014
Has thanked: 1 time

Re: Phantom ticks and processing latency

Postby TicksCollecor » 15 Apr 2014

Hi Henry,

Its a live account and its the same way in the USA stream and the EU stream.
The "scroll/pause/draw" behavior has nothing to do with the datafeed... its MC's behavior.
That's what I showed you in the slowed down video using the USA stream.
Maybe this is all of the problem and maybe its just part of the problem?

If you ask me its just a part of the problem, since even the price bars them selves print way behind SC.

Yes I compared the EU stream and its still the same.
Mind you even though MC refresh on each tick and SC (at the moment) is limited to refresh every 10ms... MC still lags by 100ms to 300ms and sometimes even more when there is a spike of trades.


Hope that helps.

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

Re: Phantom ticks and processing latency

Postby Henry MultiСharts » 24 Apr 2014

Hello TicksCollecor,

Please come to our live chat Monday-Friday 6:30 am - 11 am EST so that our developers can connect to your PC remotely to work on this case with.


Return to “MultiCharts .NET”