Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 07:28:37 +0000



Post From: Subscribing to DTN symbols

[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.