Login Page - Create Account

DTC Protocol Discussion Forum


Date/Time: Fri, 29 Nov 2024 14:33:05 +0000



DTC Client Programming for Sierra Chart platform

View Count: 6334

[2017-11-30 22:12:13]
AndrewAMD1 - Posts: 31
I have a technical question, as I am writing a DTC client for Sierra Chart.

I asked this question:
DTC Protocol | Post: 133747

I received these two responses:
DTC Protocol | Post: 133786
DTC Protocol | Post: 133787

I asked for clarification:
DTC Protocol | Post: 133791

And I was told to start a new thread:
DTC Protocol | Post: 133804

So here we are. Basically, I want to do sanity checks. My last question was this:

So just to confirm, the only way to know [that the DTC client will know that is configured to submit the correct type of LIVE, DEMO, or SIMULATION orders] is to submit orders?

Below are nine scenarios. I expect six of the scenarios to result in rejected orders. Is my understanding correct?

Client sends SIMULATED order:
1a) SC: SIM enabled (expect: accept)
1b) SC: SIM disabled, logged into DEMO account (expect: reject)
1c) SC: SIM disabled, logged into LIVE account (expect: reject)

Client sends DEMO order:
2a) SC: SIM enabled (expect: reject)
2b) SC: SIM disabled, logged into DEMO account (expect: accept)
2c) SC: SIM disabled, logged into LIVE account (expect: reject)

Client sends LIVE order:
3a) SC: SIM enabled (expect: reject)
3b) SC: SIM disabled, logged into DEMO account (expect: reject)
3c) SC: SIM disabled, logged into LIVE account (expect: accept)
[2017-12-01 02:15:23]
DTC Engineering - Posts: 320
So just to confirm, the only way to know [that the DTC client will know that is configured to submit the correct type of LIVE, DEMO, or SIMULATION orders] is to submit orders?
Really the question is more whether the instance of Sierra Chart the orders are being submitted to, through its DTC Server is in Trade Simulation Mode or not and what external trading service it is connected to, if any.


Client sends SIMULATED order:
1a) SC: SIM enabled (expect: accept)Yes.
1b) SC: SIM disabled, logged into DEMO account (expect: reject)Will be rejected.
1c) SC: SIM disabled, logged into LIVE account (expect: reject)Will be rejected.

Client sends DEMO order:
2a) SC: SIM enabled (expect: reject)
2b) SC: SIM disabled, logged into DEMO account (expect: accept)
2c) SC: SIM disabled, logged into LIVE account (expect: reject)
What do you mean by demo order? It is the TradeAccount field which is going to determine whether it is considered simulated or non-simulated.

Client sends LIVE order:
3a) SC: SIM enabled (expect: reject)Yes.
3b) SC: SIM disabled, logged into DEMO account (expect: reject)Will be accepted if the TradeAccount matches the connected to trading account.
3c) SC: SIM disabled, logged into LIVE account (expect: accept)Will be accepted if the TradeAccount matches the connected to trading account.



Date Time Of Last Edit: 2017-12-01 02:16:13
[2017-12-01 14:32:03]
AndrewAMD1 - Posts: 31
My apologies, I misread the documentation and thought that TradeMode was one of the fields for a new order, but it's TradeAccount.

It sounds like the TradeAccount field is necessary and will therefore dictate whether or not it is simulated.

So if I send an order to "Sim1" (for example), it's simulated. If I send an order to [live account number] or [demo account number], then the user must remember whether the account is live or demo. Correct?

Context: [I'm just making sure that I document this correctly for my client users - they have a completely different (existing) interface to work with. There's a drop-down menu where the user can select "Live" or "Demo", enter an account number and enter a password. They might be surprised that they can log into a live account with the "Demo" setting on.]
[2017-12-01 20:26:18]
DTC Engineering - Posts: 320

It sounds like the TradeAccount field is necessary and will therefore dictate whether or not it is simulated
Yes. It is necessary.

. If I send an order to [live account number] or [demo account number], then the user must remember whether the account is live or demo. Correct?

The order will have associated with it, the specified Trade Account and it is the Trading service that Sierra Chart is connected to, which will determine what to do with it.

You can get a list of the trade accounts with this message:
https://www.dtcprotocol.org/index.php?page=doc/DTCMessages_AccountListMessages.php#Messages-TRADE_ACCOUNTS_REQUEST

You should only be using one of the accounts in the received list. The user should only be able to use one of those accounts.

Another thing that is possible that might help and we can also provide additional help to you with, is that you can specify on the command line what particular trading service Sierra Chart will connect to and any of the associated fields required for that service.
Date Time Of Last Edit: 2017-12-01 20:26:54
[2017-12-28 19:36:15]
AndrewAMD1 - Posts: 31
Hello,

Does Sierra Chart's historical server allow TLS 1.2 connections? If so, how do I configure Sierra Chart to accept TLS 1.2 on the historical server?

I have gotten it to work with the main server, but not the historical server.

Thanks,
Andrew
[2017-12-28 22:12:49]
DTC Engineering - Posts: 320

Does Sierra Chart's historical server allow TLS 1.2 connections?
No it does not.
Date Time Of Last Edit: 2018-01-16 23:37:21
[2018-01-16 20:44:58]
AndrewAMD1 - Posts: 31
It looks like there is no way to require authentication on the Sierra Chart historical server as well. Is this correct?

Does this mean that if I open my Sierra Chart to any IP address (say, from a fixed IP), that any person on the internet can theoretically download my historical data without my permission?
Date Time Of Last Edit: 2018-01-16 20:45:38
[2018-01-16 23:36:56]
DTC Engineering - Posts: 320
Yes, that is true but we will add authentication.
[2018-01-17 01:34:02]
AndrewAMD1 - Posts: 31
Excellent!

Are there plans to implement TLS 1.2 on the historical socket as well? I would prefer to submit my login credentials in an encrypted format.
Date Time Of Last Edit: 2018-01-18 13:39:07
[2018-01-18 13:44:08]
AndrewAMD1 - Posts: 31
Another question about Sierra Chart's use of DTC:

On SC's main DTC socket, when it sends a LOGON_RESPONSE, does it change the output depending on which broker the platform is logged in to?

Example #1: If "OCOOrdersSupported" and "BracketOrdersSupported" are ==1, this necessarily means the broker accepts bracket orders?

Example #2: "UsesMultiplePositionsPerSymbolAndTradeAccount" ==1, this necessarily means this broker allows hedging with the same asset?
[2018-01-18 16:06:22]
DTC Engineering - Posts: 320
Example #1: If "OCOOrdersSupported" and "BracketOrdersSupported" are ==1, this necessarily means the broker accepts bracket orders?
The answer is no. These will always be supported by the DTC server in Sierra Chart because Sierra Chart internally will support these types of orders.


Example #2: "UsesMultiplePositionsPerSymbolAndTradeAccount" ==1, this necessarily means this broker allows hedging with the same asset?
No. In the case of the Sierra Chart DTC server, this will never be 1.
[2018-01-18 16:24:43]
AndrewAMD1 - Posts: 31
The answer is no. These will always be supported by the DTC server in Sierra Chart because Sierra Chart internally will support these types of orders.
This is interesting.

Question: Does Sierra Chart necessarily internalize **all** bracket orders, or does it actually submit the child orders (stop + limit) to the broker when the broker is able to accept it?

***** EDIT *****
Found the answer on the SC / CQG description:
http://www.sierrachart.com/index.php?page=doc/CQGTrading.php
Date Time Of Last Edit: 2018-01-18 20:11:58
[2018-01-18 18:04:32]
AndrewAMD1 - Posts: 31
Question: Does Sierra Chart necessarily internalize **all** bracket orders, or does it actually submit the child orders (stop + limit) to the broker when the broker is able to accept it?
For example: SC is logged in to CQG, and my client is logged into SC main socket. I send a bracket order, with market and child-stop and child-limit (take-profit).

The market order is processed. What happens to the child orders? Do they go to CQC, or do they sit on Sierra Chart, waiting for the market to fluctuate in order to send the respective market order?


***** EDIT *****
Found the answer on the SC / CQG description:
http://www.sierrachart.com/index.php?page=doc/CQGTrading.php
Date Time Of Last Edit: 2018-01-18 20:12:05
[2018-01-18 22:46:36]
DTC Engineering - Posts: 320
We see that you found the answer. This is the relevant setting in Sierra Chart for this:
Global Settings >> General Trade Settings >> Use Server-Side Bracket Orders
[2018-01-19 02:39:01]
DTC Engineering - Posts: 320

Are there plans to implement TLS 1.2 on the historical socket as well? I would prefer to submit my login credentials in an encrypted format.
Yes, we can do this as well.
[2018-01-22 16:02:48]
AndrewAMD1 - Posts: 31
New question:

I submit a bracket order to Sierra Chart DTC main server:
* One parent market order, buy to open.
* OCO target: limit order at a high price, sell to close.
* OCO stop: stop order at a low price, sell to close.

The parent order transaction took place, so now the OCO's are open.

I decide to end the bracket by selling at market price, so I send a cancel-replace for the OCO target, converting it to a market order.

From the documentation:
https://dtcprotocol.org/index.php?page=doc/DTCMessages_OrderEntryModificationMessages.php#Messages-CANCEL_REPLACE_ORDER

"OrderType" - "The server is under no obligation to support changing the order type."

Does SC support changing OrderType?
Date Time Of Last Edit: 2018-01-22 16:43:32
[2018-01-22 19:03:39]
DTC Engineering - Posts: 320
Changing the order type makes no sense. Sierra Chart does not support this and never will support it. This is something that has been removed from DTC. The documentation still needs to be updated.

Also this question is posted in an unrelated thread. You should start a new thread for this.
Date Time Of Last Edit: 2018-01-22 19:04:06

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

Login

Login Page - Create Account