Polling GetExternalSymbol for new bar arriving at Strategy Monitor
Author: kazuna
Creation Date: 4/20/2018 6:02 PM
profile picture

kazuna

#1
Suppose I have a Strategy Window calling GetExternalSymbol for a symbol.
At the same time, I have a strategy in Strategy Monitor running on that external symbol.

Will polling GetExternalSymbol get you the bar data once the strategy in Strategy Monitor get the bar update?

Let's say I have a code in Strategy Window like this:
CODE:
Please log in to see this code.


And I have a strategy in Strategy Monitor that is set to {"AAA", "BBB", "CCC"} as DataSets.

Will GetExternalSymbol get the new bar as soon as the bar update for "AAA" arrives?

Does it have to wait for "BBB" and "CCC" to get bar update for "AAA"?
profile picture

Cone

#2
QUOTE:
Will polling GetExternalSymbol get you the bar data once the strategy in Strategy Monitor get the bar update?
Unlikely. I'm pretty sure that in both cases (S. Window and S. Monitor) a static data request is created for that secondary symbol's update. So it's a round trip in both cases, but a S. Window would generate the request more quickly than the S. Monitor.

QUOTE:
Will GetExternalSymbol get the new bar as soon as the bar update for "AAA" arrives?
In the case of the S. Monitor, it's most likely that the data on the back end for other symbols in the same time interval will be ready as other symbols' updates are received.

QUOTE:
Does it have to wait for "BBB" and "CCC" to get bar update for "AAA"?
I'm not sure because it may depend on the interval. I'd need to test to determine the answer, but at the moment I'm not able.
profile picture

kazuna

#3
QUOTE:
Unlikely. I'm pretty sure that in both cases (S. Window and S. Monitor) a static data request is created for that secondary symbol's update. So it's a round trip in both cases, but a S. Window would generate the request more quickly than the S. Monitor.
If I remember correctly, getting the secondary symbol via GetExternalSymbol in S. Window returns the bar data but one or two minutes behind. (Ticket #18663) Is it fixed so that GetExternalSymbol actually generates a round trip request to the server?

QUOTE:
I'm not sure because it may depend on the interval. I'd need to test to determine the answer, but at the moment I'm not able.
This question is based on observing the strategy running in S. Monitor. If there are more than one symbols set as DataSets, the strategy won't execute until new bars for all the symbols arrive. I was wondering if this is applicable to bar data retrieving from GetExternalSymbol.
profile picture

Cone

#4
The User Guide > Strategy Monitor (top topic) indicates:

Behavior 1: Intervals 5 minutes and lower
· Strategies are executed as soon as the data updates are retrieved on a per-symbol basis.

Behavior 2: Intervals greater than 5 minutes
· When fed by a Static Provider, strategies execute only after all data are collected for the DataSet or after 90 seconds have elapsed. However, when supported by Streaming Providers, strategies are executed as soon as data updates are retrieved on a per-symbol basis.
profile picture

kazuna

#5
QUOTE:
The User Guide > Strategy Monitor (top topic) indicates:
I didn't realize that it behaves differently based on the bar interval. Probably my statement about observing the S. Monitor is based on Daily scale strategy.

I have a couple of question for you.

Is the bar data delay issue reported in Ticket #18663 (bar data from GetExternalSymbol in S. Window was one or two minutes behind) fixed?

Suppose bar data delay issue is fixed. What does GetExternalSymbol do if the bar doesn't close (e.g. zero volume bar)? Does GetExternalSymbol return immediately?

QUOTE:
Strategies are executed as soon as the data updates are retrieved on a per-symbol basis.
This is applicable to Fidelity Static Provider as well, isn't it?

QUOTE:
However, when supported by Streaming Providers, strategies are executed as soon as data updates are retrieved on a per-symbol basis.
Is this applicable to Fidelity Static Provider?

QUOTE:
If the symbol is not in the local data store, this will result in a long delay. These data are updated on demand and saved locally.
QUOTE:
Thereafter, data from new interval updates are not saved (eliminates disk access delay for saving multi-megabyte files).
I'm confused these statements. The first one says that data are saved locally. The second one says data are not saved. Which is correct?
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).