Login Page - Create Account

Support Board


Date/Time: Thu, 28 Mar 2024 14:03:32 +0000



DTC test client not supporting OCO and bracket orders

View Count: 704

[2020-03-24 15:26:24]
BeardPower - Posts: 51
Please comment and these issues I have:

1) I set my DTC-Server implementation to support OCO and bracket orders, but the test client is sending "IsParentOrder: 0" when using an OCO or bracket order.
2) The ClientOrderID consists of a tuple like "2691.398". The documentation does not mention a tuple or some ID separated by a ".".
3) The documentation of several DTC fields is outdated. E.g., s_SubmitNewSingleOrder has a different field order in the GitHub repository than in the documentation on your website.
4) Sending multiple unsolicited SymbolIDs to the DTC client results in only the first symbol to be added. All the following ones don't get registered on the client.
5) The logon request is sending the "Trade Account" setting in the "DTC Service" setting, but the client sends the Trade-Account ID of the SC instance when submitting orders if the TRADE_ACCOUNT_RESPONSE is not sent.
Date Time Of Last Edit: 2020-03-24 16:26:05
[2020-03-25 06:42:15]
uM8137 - Posts: 180
I'm not SC support. I'm just a user who has written DTC code.

1) first guess: is the client set to use client-side or server-side OCOs?
Global Trade Settings Windows: Use Server Side OCO Orders (if supported) (Global Settings >> General Trade Settings >> General)

2) ClientOrderID is for the client's purposes only, and can be any string, but can't be repeated inside a couple of days. So UUIDs are common. https://dtcprotocol.org/index.php?page=doc/DTCMessages_OrderEntryModificationMessages.php#Messages-SUBMIT_NEW_SINGLE_ORDER

3) field order is irrelevant in C++ and in protocol buffers, of course. I'm not aware of any official Github repo. Which?

4) I would guess the client is correct in ignoring unwanted symbols, to preserve bandwidth.

5) I have no idea. I'm not sure what is unexpected versus observed here.

Generally, I would suggest writing a DTC client first, and validate it against SC proper. Then you'll have the ability to test your server with precision.
[2020-03-25 07:58:45]
Sierra Chart Engineering - Posts: 104368
1. Make sure this option is enabled:
Global Trade Settings Windows: Use Server Side Bracket Orders (if supported) (Global Settings >> General Trade Settings >> General)

2. This can be anything. It does not matter. You can set the rules for what it is.

3. The field order in the documentation may be different. It does not matter. The GitHub repository is no longer maintained. Obtain the latest files here:
https://www.dtcprotocol.org/

4. Update to the latest version of Sierra Chart:
Software Download: Fast Update

5. Yes this does make sense. Sierra Chart has to be given the trade accounts for them to be listed on the Trade Window:
Basic Trading and the Trade Window: Main/C >> Trade Account (Selecting Trade Account for Chart / Trade DOM)
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: 2020-03-25 07:59:05
[2020-03-25 11:22:37]
BeardPower - Posts: 51
Thanks to both of you! Appreciate it.

Sorry, I should have been more clear about it.

I am referring to the latest Sierra Chart as a test client (the DTC Service [trading]), and I am using binary encoding (fixed length).

1. Thanks! That solved both of my issues. I forgot to set it.

2. Yes, but the issue is this (forget about the timeout):
From the SC log: Trade Order Error - Order timed-out waiting for response from service/exchange server. Internal Order ID: 2721. Service Order ID: (none). Symbol: BTCEUR. Account: CoinMetro | 2020-03-25 11:03:24.166 *
What the server receives from the client: ClientOrderID: ['2', '7', '2', '1', '.', '3', '4', '5', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00']
Why is the log not using "2721.345" as it is sent to the server?

3. The git repo is here. https://github.com/DTC-protocol/DTC. Why is it not maintained anymore?
I'm using binary encoding (fixed length), so the field order matters. I assume that the documentation is outdated as well because the field order (structure layout) in the DTC documentation is different from the field order (structure layout) in the header files.
E.g. https://dtcprotocol.org/index.php?page=doc/DTCMessages_OrderEntryModificationMessages.php#Messages-SUBMIT_NEW_SINGLE_ORDER
TradeAccount is not near the same fields like in the header file:

char Symbol[SYMBOL_LENGTH];
char Exchange[EXCHANGE_LENGTH];
char TradeAccount[TRADE_ACCOUNT_LENGTH];
char ClientOrderID[ORDER_ID_LENGTH];

4. I'm using the latest SC version.

5. What's the purpose of the "Trade Account" setting in "DTC Service" then? It is transferred to the server, but it is not populated in Sierra Chart. So I assume that the server still has to reply with that "Trade Account".

I also implemented a DTC client. The main issue is that some documentation on the DTC website is outdated and does not match the latest header files.
Date Time Of Last Edit: 2020-03-25 11:36:52
[2020-03-27 05:06:31]
Sierra Chart Engineering - Posts: 104368
2. What the Sierra Chart log is showing is the internal order ID. What is called the client order ID is different. That is internally generated and has an additional value.

3. The Git repository is now deleted. It is just not maintained anymore and were not going to say anything further about this.

You definitely cannot use the documentation to determine field order. Do not do that. We should not even have to say this. That should be overwhelmingly clear. This is not making any sense because you already have a data structure to work with which is controlling the field order. You should not be attempting to do this manually. Otherwise, you can skip over padding.



4. Refer to:
Data and Trading Communications (DTC) Protocol Test Client: Populating Symbol List in Sierra Chart

In particular refer to the field IsFinalMessage. Must relate to that.



5. The documentation for that field is updated. Do not use it. It has only specialized purposes.

The main issue is that some documentation on the DTC website is outdated and does not match the latest header files.
Some new fields may not be documented. We will get to those. Give us an example of what does not match.
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: 2020-03-27 05:11:42

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

Login

Login Page - Create Account