Support Board
Date/Time: Tue, 22 Apr 2025 02:21:36 +0000
TCP or websocket connection in study possible?
View Count: 894
[2023-01-31 13:38:52] |
glacialspring - Posts: 26 |
I would like to copy trades from one instance of Sierra Chart to another and thought that a study using a TCP or websocket connection to listen for new trades would be the best way. Is it possible to do this? What is the lifecycle of a sierra chart study? I figure I can always use polling with the built-in http request function as a workaround but that doesn't seem great.
|
[2023-02-01 21:51:29] |
Sierra_Chart Engineering - Posts: 19290 |
Yes you could do this, but you could not utilize asynchronous notifications when data has arrived.
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, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-02-25 23:49:45] |
Fanch - Posts: 19 |
I am interested in achieving the same, and was considering using a websocket client in the Study that could consume trading signals coming from the websocket server. I am curious to understand: why wouldn't the study be able to use the trading signals it receives? Is it because the life cycle management of a Study can not be mixed with asio threads?
|
[2023-02-26 03:38:01] |
glacialspring - Posts: 26 |
I actually haven't implemented websockets yet, but I assume they mean that the orders will not be placed in response to the websocket message without first being read during the regular study update cycle. Polling with their built-in http request is sufficient right now for me, but I would do a buffered websocket client with UpdateAlways and a chart update interval as short you you can.
|
[2023-02-26 10:43:46] |
Sierra_Chart Engineering - Posts: 19290 |
It can: why wouldn't the study be able to use the trading signals it receives?
How you develop this is up to you. The only point is that a custom study function is called by Sierra Chart and not by another method. However, when the custom study function is called by Sierra Chart, it can be set to Update Always at the Chart Update Interval, then you can access the data by whatever means that you want at that point in time. Yes exactly: but I assume they mean that the orders will not be placed in response to the websocket message without first being read during the regular study update cycle.
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, use the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2023-02-26 10:45:18
|
To post a message in this thread, you need to log in with your Sierra Chart account: