Same thing for me, I have 20 symbols to load, each for 4 timeframes, without async it's not usefull. My code test if the bars has been fetched (test the null of the value and if the count is >0 ) before using it. I use a dictionary in the async method to add the bars in.
The problem is during the loop with MarketData.GetBarsAsync, if I have 5 symbols * 4 timeframes there are fetched without error, if I add one more symbols I will receive an error Symbol has no quotes for one of the symbols in my list, not the same timeframe. Sometime it's a symbol completely (all timeframes) and sometime it's on or two of thos 4 timeframes !
I tried to sleep and RefreshData after the sleep but the error is still there. The ‘solution’ with the Print does nothing (perhaps it was to do a call in the main thread ans refresh something we don't know).
RE: Found a bug using Indicators.. in Initialize method
Hi,
this is the code and a print screen. I have to switch from tab to tab, change the timeframe, etc. This indicator is in all tabs. When the bug arrive in a cbot it's very annoying ;-)
This website uses cookies to enhance site navigation, analyze site usage, and assist in our marketing efforts. By clicking “Accept All” you are providing your consent to our use of all cookies. Alternatively, please provide your choice by pressing “Customize Cookies”. For more information, please read our Privacy policy
lbellego
23 Feb 2025, 16:39
RE: RE:
Same thing for me, I have 20 symbols to load, each for 4 timeframes, without async it's not usefull. My code test if the bars has been fetched (test the null of the value and if the count is >0 ) before using it. I use a dictionary in the async method to add the bars in.
The problem is during the loop with MarketData.GetBarsAsync, if I have 5 symbols * 4 timeframes there are fetched without error, if I add one more symbols I will receive an error Symbol has no quotes for one of the symbols in my list, not the same timeframe. Sometime it's a symbol completely (all timeframes) and sometime it's on or two of thos 4 timeframes !
I tried to sleep and RefreshData after the sleep but the error is still there. The ‘solution’ with the Print does nothing (perhaps it was to do a call in the main thread ans refresh something we don't know).
Luc
@lbellego