Support Board
Date/Time: Sun, 24 Nov 2024 05:32:45 +0000
Subscribing to DTN symbols
View Count: 1899
[2013-10-01 16:46:07] |
User57180 - Posts: 8 |
Is it possible as part of an ASCIL, to subscribe directly to a group of symbols and parse the incoming messages and then pass the results of that parse to SC as a study? Many of my strategies involve analyzing Volume on the Options of an Instrument to make trading decisions on the underlying. I'd rather not add 300 options contracts to SC. I was hoping to be able to subscribe directly from the code I write when building the ASCIL study, parse the data and then plot the results in SC. I don't see any functions for subscribing directly to IQFeed symbols. Thanks.
|
[2013-10-01 22:20:23] |
Sierra Chart Engineering - Posts: 104368 |
This function is not documented but have a look at : sc.GetBasicSymbolData(const char* Symbol, s_SCBasicSymbolData& BasicSymbolData, bool Subscribe); This should do what you want. The s_SCBasicSymbolData object contains volume data and the basic price data for the symbol. 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 |
[2013-10-01 22:24:28] |
User57180 - Posts: 8 |
Thanks so much. I am new to C++ and your documentation is really helping me along. Is there anyway you could reply to this post with a sample of how you might demonstrate its usage if it were documented?
|
[2013-10-03 03:00:47] |
Sierra Chart Engineering - Posts: 104368 |
We will put together a code example for you.
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 |
[2013-10-04 09:41:52] |
Sierra Chart Engineering - Posts: 104368 |
We apologize for the delay. Things have been very busy for us. Here is the example: // Get the daily high price for another symbol. The first time this // function is called after connecting to the data feed, the symbol data // will not be available initially. Once the data becomes available, when // this function is called after, the symbol data will be available. If // this study is used on a chart for a symbol which does not frequently // update, then it will be a good idea to set sc.UpdateAlways = 1. const char * Symbol = "ABC"; s_SCBasicSymbolData BasicSymbolData; sc.GetBasicSymbolData(Symbol,BasicSymbolData, true); float DailyHigh = BasicSymbolData.High; 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: 2013-10-04 09:48:16
|
[2013-10-04 22:47:30] |
Al SC Developer - Posts: 434 |
There is not much to calling the routine, but you need to understand the use model. Calling this routine will return the current volume and price data for the specified symbol (see the definition of s_SCBasicSymbolData for what is provided). The data that is returned when you call this routine is the current snapshot in time. The last parameter allows the symbol to be subscribed, just set it to true for the symbol to be subscribed. Subscribing to a symbol, does not mean that your study will be called for all symbol updates, but instead that all data is being received for all of the symbols by SC. For example, say you subscribed to 10 symbols to try and form an index. In this case, all 10 symbols would be subscribed, but the study would only be called based on the symbol for the current chart (not called for each individual symbol update). So, to continue the index example, you could have a list of 10 symbols that you loop thru, and call GetBasicSymbolData() for each symbol. After each call, examine the returned data and do your calculations. So in this scenario, you can form an index by adding all of the last price values together and dividing by 10, and placing the result in a subgraph. |
To post a message in this thread, you need to log in with your Sierra Chart account: