Provide a mechanism to determine when (time) SM's Status = LoadingData event is invoked so another thread or process (chart) could block until, for instance, the BacktestComplete() override is completed. If the data request was incomplete provide an error result.
Rename
The Strategy execution process doesn’t even begin until the data loading is completed, so i don’t think this is feasible.
Could it be modified to begin after the data is requested?
Not for WL8 that’s for sure. I was reading the other thread, is the driver here more being able to coordinate EXTERNAL data requests from within a strategy?
I'm not doing any external data requests now.
I think "driver" in my case is the streaming script which runs in SM on a dataset say for S&P 100, collects and wraps each bar with metadata, collect them to a List<> and then to "SetGlobal" . Say 8 seconds later the receiving script, from a chart of say SPY, does "GetGloball" and performs the statistical calculations and annotates each bar.
I think "driver" in my case is the streaming script which runs in SM on a dataset say for S&P 100, collects and wraps each bar with metadata, collect them to a List<> and then to "SetGlobal" . Say 8 seconds later the receiving script, from a chart of say SPY, does "GetGloball" and performs the statistical calculations and annotates each bar.
OK I see. This is a pretty specific use-case. It sounds like the receiving strategy needs to "spin" in a loop checking GetGlobal for when the information is updated. Maybe the publishing script could also set a DateTime variable in SetGlobal, and the receiving strategy would look for the DateTime, and when it reaches the current threshold, it knows the information is updated and can continue. It doesn't sound like something we should consider as a general enhancement. Am I on the right track here?
Yes your response echo's exactly Cone's
QUOTE:. Thanks
Just save the timestamp of the bar with the data. Then it's easy to see if it's up-to-date with the timestamp of the last bar of the primary script.
Your Response
Post
Edit Post
Login is required