I've read the two quick ref's repeatedly, but I'm having issues using both SetContext and GetExternalSeries and i don't understand when one should be used vs the other.
Here are some specific questions (whenever I use either of the above i have synch set to true):
1. if SetContext is called and the symbol is not in the current dataset but is in another dataset, I believe SetContext sets the Bars object to the data from the other dataset -- similar to GetExternalSeries being called without a dataset name specified. In one dataset, I have the symbol: AGII and for some reason, there is no data for it in the dataset (Yahoo provider, daily data). Separately, i have the same symbol in a Fidelity 5 minute dataset. It seems when i call SetContext( "AGII", true ). the bars object is set to the 5 minute object and then the system attempts to Synch it to my timeframe (which happens to be weekly). There seems to be a bug in this synchronization process as the data is not returned as weekly data.
2. Following in the above example where there is a symbol in a dataset with no data in it, I want Wealth-Lab to generate a runtime error (for which I am trapping in code), but Wealth-Lab doesn't seem to do that. Regardless of whether I specify the DataSetName or leave the DataSetName out, Wealth-Lab ignores the fact that the symbol is in my List but with no data and goes and tries to return the 5 minute bar data -- but with some synchronization error as above. How can I make Wealth-Lab generate the run-time error?
3. Can you provide guidance as to when GetExternalSeries should be used vs SetContext?
4. I think if GetExternalSeries is called with a specified DataSetName and the data can not be found, instead of Wealth-Lab going and search through other datasets for the symbol, it should Throw and error. If someone's gone through the effort to specify the dataset name and the symbol isn't there, the program probably shouldn't continue executing with other (possibly suspect data). (This last, not a question, but an opinion :) ).
Thanks for the help, as always!
Steve
here are the two quick ref entries:
CODE:
Please log in to see this code.
CODE:
Please log in to see this code.