GetBarsAsync example?
Created at 10 Feb 2020, 04:49
GetBarsAsync example?
10 Feb 2020, 04:49
Hi everyone:
I have the following code. Would anyone be able to provide an example of how I can do this with the new method GetBarsAsync?
//some initializing code in the method.
_marketSeriesShortTimeFrame = MarketData.GetBars(MAShortTimeFrame, _symbols);
_marketSeriesMediumTimeFrame = MarketData.GetBars(MAMediumTimeFrame, _symbols);
_marketSeriesLongTimeFrame = MarketData.GetBars(MALongTimeFrame, _symbols);
//other code and calculations performed once we have the market data.
//How can I make sure this code from here down isn't run until all the above async calls have completed?
Thank you.