Question on Timestamp on Orders Generated

Questions about MultiCharts and user contributed studies.
Ming80
Posts: 24
Joined: 18 Jun 2012
Has thanked: 20 times
Been thanked: 1 time

Question on Timestamp on Orders Generated

Postby Ming80 » 25 May 2017

Hi Guys,

Sorry if this is a silly question but am trying to troubleshoot around my own latency so hopefully I could get some pointers from you guys.

1. Under Order and Position Tracker > Orders > Generated - Is the time stamp for this:
a) Then time when it is generated by MC on your trading computer? Or:
b) The time when it is received/acknowledged from the execution broker?

In one of the examples, an order was generated at 17:00:00:600. I'm currently located 20ms from my dataprovider/exchange/broker so was trying to account for the lag of 600ms where roundtrip of data should only take ~ 40ms?
If the timestamp was b) only after being acknowledged from broker, the lag could possibly be due to the brokers internal processes before submitting to the exchange. However, if the time stamp was due to a) where it left MC, I would then have to dig deeper to see if the lag was due from data provider/ MC code/ or own Clock sync issues. Pleased to hear any pointers on the above. Thanks!

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

Re: Question on Timestamp on Orders Generated

Postby TJ » 25 May 2017

Hi Guys,

Sorry if this is a silly question but am trying to troubleshoot around my own latency so hopefully I could get some pointers from you guys.

1. Under Order and Position Tracker > Orders > Generated - Is the time stamp for this:
a) Then time when it is generated by MC on your trading computer? Or:
b) The time when it is received/acknowledged from the execution broker?

In one of the examples, an order was generated at 17:00:00:600. I'm currently located 20ms from my dataprovider/exchange/broker so was trying to account for the lag of 600ms where roundtrip of data should only take ~ 40ms?
If the timestamp was b) only after being acknowledged from broker, the lag could possibly be due to the brokers internal processes before submitting to the exchange. However, if the time stamp was due to a) where it left MC, I would then have to dig deeper to see if the lag was due from data provider/ MC code/ or own Clock sync issues. Pleased to hear any pointers on the above. Thanks!

> roundtrip of data should only take ~ 40ms

How do you come up with the "40ms" roundtrip?
Have you accounted for the following:

1. After receiving your order, the processing time at the broker before it is sent to the exchange
2. The latency between your broker and the exchange
3. The order execution time
4. The processing time at the exchange before and after the order is executed
5. The processing time at the broker after the order status is received from the exchange
6. ...

Ming80
Posts: 24
Joined: 18 Jun 2012
Has thanked: 20 times
Been thanked: 1 time

Re: Question on Timestamp on Orders Generated

Postby Ming80 » 25 May 2017

Thanks TJ,

Yes, that was specifically what I was asking albeit obvious too many. To be sure, the timestamp "Generated" is when the exchange deems the order marketable/rejected and not when the broker gets the order / or when multicharts fires the order to the broker. If there was a timestamp when MC sends the order to the broker that would help visualize where the delays occur better.

Zheka
Posts: 223
Joined: 13 Jan 2016
Has thanked: 8 times
Been thanked: 53 times

Re: Question on Timestamp on Orders Generated

Postby Zheka » 01 Jun 2017

Hi, Ming80,

Where could one read that the "Generated" timestamp is for "when the exchange deems the order marketable"?
Until now I thought that "Generated" is what it means i.e. generated by MC.

My investigation a year ago showed that this timing to a large degree is driven by the "bar closing time".
MC does not close a bar (=does not start processing of a signal) until the first tick of the new bar arrives, which leads to orders being submitted from 2-5ms up to 2sec+ later than the "atomic clock" time.
It should be possible to tinker in the registry and force MC to close a bar "on time" (+ some changes in the code with RecalcLastbarafter) (see viewtopic.php?t=22239)
But however I tried I could not make it work consistently correctly, so I moved production execution to a different platform and made it work as it should.

Another factor slowing things a bit is extensive MC's own logging. It does allow to investigate problems when they appear but also influences performance. Search the forum for how to turn it off.


Return to “MultiCharts”