Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 06:39:51 +0000



DTC Server Market Depth Message Model Semantics

View Count: 1133

[2019-01-07 17:02:58]
User12089 - Posts: 349
I have two key questions regarding the implementation of custom DTC Server and when the Client of such DTC Server is Sierra Chart.

1. How is Market Depth Update supposed to work for the following book events Order Submit, Order Cancel and Order Update - specifically in relation to the "NumOrder" field of the MARKET_DEPTH_UPDATE_LEVEL DTC Market Data Message

Market Data Messages: MARKET_DEPTH_UPDATE_LEVEL [s_MarketDepthUpdateLevel structure] Server >> Client

For example if the Event is Order Cancel and the event was about 34 lots being Cancelled, then is the NumOrder supposed to contain -34 (minus 34)?

Then when there is a modification of previous Order for 57 lots to 12 lots what is the value of NumOrder supposed to be ?

Then when there is a modification of previous Order for 57 lots to 92 lots what is the value of NumOrder supposed to be ?


When MarketDepthUpdateTypeEnum = MARKET_DEPTH_DELETE_LEVEL, it seems that it wipes out the whole Price Level clean and hence is NOT applicable to the above scenarios, correct?

2. DTC Server Multithreading Model

The DTC Protocol Spec seems to imply that each client uses only ONE/Single DTC TCP/IP Connection and hence Server Thread to receive the market data messages for ALL subscribed Symbols/Instruments. Is that correct? (here by "connection / market data messages / thread" I mean connection/messages of the same type e.g. Real-Time Market Data is one such type, historical market data is a separate type etc)

When SC is the DTC Client, does it behave as specified above ie each SC Instance uses only a single TCP/IP Connection and hence DTC Server Thread for ALL subscribed symbols/instruments?

And finally, when there is e.g. a second SC Instance which connects to the same DTC Server, it will open a separate TCP/IP Connection to the same DTC Server TCP/IP Port and hence the DTC Server will create and launch a separate Thread to serve this new TCP / IP connection. But the general rule remains the same - one TCP/IP connection per SC Instance client for all subscribed symbols - correct?
[2019-01-07 18:38:20]
Sierra Chart Engineering - Posts: 104368
1. NumOrder would never be negative. It simply represents the number of orders at a particular price level, if you know what those are. It is not applicable in the case of deleting a level.



When MarketDepthUpdateTypeEnum = MARKET_DEPTH_DELETE_LEVEL, it seems that it wipes out the whole Price Level clean and hence is NOT applicable to the above scenarios, correct?
Yes.

2. Are you referring to the DTC server within Sierra Chart? That involves no more than three threads.


When SC is the DTC Client, does it behave as specified above ie each SC Instance uses only a single TCP/IP Connection and hence DTC Server Thread for ALL subscribed symbols/instruments?
Yes.


And finally, when there is e.g. a second SC Instance which connects to the same DTC Server, it will open a separate TCP/IP Connection to the same DTC Server TCP/IP Port and hence the DTC Server will create and launch a separate Thread to serve this new TCP / IP connection. But the general rule remains the same - one TCP/IP connection per SC Instance client for all subscribed symbols - correct?
This is true but there is not a separate thread for each client connection. That would not make sense.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2019-01-07 18:38:54
[2019-01-08 10:46:23]
User12089 - Posts: 349
Regarding "2. Are you referring to the DTC server within Sierra Chart? That involves no more than three threads." - no I am referring to what the implementers/developers of custom DTC Server are supposed to do. All my questions are related to the development of custom DTC Server which is supposed to comply with the specification of the DTC Protocol Standard from Siera Chart
[2019-01-08 11:06:24]
Sierra Chart Engineering - Posts: 104368
No one has ever asked us these kinds of questions. You are free to implement the server as you want in this regard. The protocol is not about these details at all. These are software implementation details for you to decide.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-01-08 11:25:49]
User12089 - Posts: 349
Regarding "1. NumOrder would never be negative. It simply represents the number of orders at a particular price level, if you know what those are. It is not applicable in the case of deleting a level."

Ok but the Exchanges don't distribute the Market Depth data in the above Aggregated way. They distribute it at the level of granularity of individual Limit Order Events. So a DTC Server would have to do some Aggregation preprocessing on the behalf of SC. Hence the following questions:

a) If the Total number of Limit Orders for a price level in the Order Book becomes ZERO, then the DTC Server is supposed to send to SC which of the following?:

A_1 - INSERT_UPADTE Market Depth Message with size / number of market orders = ZERO
A_2 - DELETE Market Depth Message

b) in what circumstances a Custom developed DTC Server would have to send a DELETE Market Depth Message to SC specifically - I don't think SC would ever wipe out a price level in its internal representation of the Limit Order Book


ps: "No one has ever asked us these kinds of questions."- this is really awkward statement - you need to change your attitude mate (I am telling you that as a senior software architect and developer and profitable trader and paying SC client )
[2019-01-08 18:07:30]
Sierra Chart Engineering - Posts: 104368
a) If the Total number of Limit Orders for a price level in the Order Book becomes ZERO, then the DTC Server is supposed to send to SC which of the following?:

A_1 - INSERT_UPADTE Market Depth Message with size / number of market orders = ZERO
A_2 - DELETE Market Depth Message


b) in what circumstances a Custom developed DTC Server would have to send a DELETE Market Depth Message to SC specifically - I don't think SC would ever wipe out a price level in its internal representation of the Limit Order Book
Logically if there is no data to be displayed any longer at a particular price level, and that is a decision that you must make, then you would want to delete that price level. Sierra Chart itself is not going to delete the data at a price level in the market depth data.


- you need to change your attitude mate
We do not agree. We need to be very clear and to the point. Nothing is going to change here.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2019-01-08 18:08:34
[2019-01-11 19:27:36]
User12089 - Posts: 349
"Logically if there is no data to be displayed any longer at a particular price level, and that is a decision that you must make, then you would want to delete that price level. Sierra Chart itself is not going to delete the data at a price level in the market depth data"

"I" don't have anything to "delete" here - "I" am a custom developed DTC Server which has only one client - Siera Chart - so the question was (and I am repeating it yet again):

Does it make sense for a custom developed DTC Server to send SC as the SPECIFIC "DTC Client" a DTC Market Depth Message with flag/operation DELETE and if yes then in what circumstances. This is a question STRICTLY about SC as strictly and specifically the DTC Client of my custom developed DTC Sever

Which of the following 2 options is sufficient for SC to become aware that the number of Limit Orders for specific Price Level is now ZERO:

a) Get a DTC Market Depth Message with INSERT_UPDATE flag and size=0
b) Get a DTC Market Depth Message with DELETE flag

do NOT worry about the internals of the DTC Server itself and whether it needs to delete anything internally for the purposes of this question

And to make it even simpler and easier for you I will compress everything above into single YES or NO question:

1. Does SC need DELETE message ever / at all ? just answer YES or NO here

2. IF yes, THEN describe in what circumstances
Date Time Of Last Edit: 2019-01-11 19:52:23
[2019-01-11 20:42:15]
Sierra Chart Engineering - Posts: 104368
Does it make sense for a custom developed DTC Server to send SC as the SPECIFIC "DTC Client" a DTC Market Depth Message with flag/operation DELETE and if yes then in what circumstances.
Yes.

Let's say the you are providing 2 levels of market depth data. Currently there are the following prices/quantities: 100/5, 101/2. And then there no longer is the price level 101 because the prices have moved away from it or its quantity has dropped to 0 then you will want to delete 101.

b) Get a DTC Market Depth Message with DELETE flag
You need to do this.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-01-11 20:48:16]
User12089 - Posts: 349
ok thank you very much, that's competed the information I needed. So after all, INSERT_UPDATE with size=0 is of no use to SC and a custom developed DTC Server MUST send SC a DELETE
[2019-01-19 13:56:00]
User12089 - Posts: 349
I can confirm that it is pretty easy to follow the DTC Protocol Spec from SC and implement a custom DTC Server for integration with additional Market Data Vendors.

The SC Software Architecture to use a DTC Server as a form of Market Data Adapter is ingenious. It makes everything very easy to implement and decoupled.

On top of everything we have implemented our DTC Server in Java (due to the Market Data Vendor APIs being available in Java) and it was very easy to do that. The SC spec for Google Protocol Buffers for DTC Messages was crucial for the rapid progress during the development of our Java based DTC Server. It provided excellent DTC Message interoperability across Java and C.

All in all that has cemented further my opinion of SC as the best trading platform in the Capital Markets industry. And boy I have tried and used all major trading platforms out there (including "institutional") and secondly I am a professional software engineer and a profitable trader - I can tell you without a shadow of a doubt - SC is the best product out there!

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account