I request one daily bar while the market is open:
lExpectedHandle = eSignal.get_RequestHistory(requestData.symbol, "D", IESignal.barType.btBARS, 1, -1, -1);
I want to receive a new bar whenever there's new data, so I don't call ReleaseHistory after I receive the data. I do get an OnBarsChanged event when there's new data (e.g., a trade). But GetNumBars always tells me there are two bars available, not just one. The second bar is the daily bar from the previous trading day. Why am I getting this bar when I asked for 1 day's worth of bars, and the market is open? I think I should just get bars for today, and not get yesterday's bars over and over. I've got code that looks at the bar's date and skips the rest of my processing if it's from yesterday, but I'm burning up a lot of CPU retrieving these bars from eSignal.
Please don't respond with "you should be getting streaming quotes or T&S ticks instead of continuous historical bars." I would love to use either one of those methods, but the intra-day volume info provided by those two streams is off by a huge amount (sometimes > 10%), and my algorithm depends on accurate intra-day volume data.
lExpectedHandle = eSignal.get_RequestHistory(requestData.symbol, "D", IESignal.barType.btBARS, 1, -1, -1);
I want to receive a new bar whenever there's new data, so I don't call ReleaseHistory after I receive the data. I do get an OnBarsChanged event when there's new data (e.g., a trade). But GetNumBars always tells me there are two bars available, not just one. The second bar is the daily bar from the previous trading day. Why am I getting this bar when I asked for 1 day's worth of bars, and the market is open? I think I should just get bars for today, and not get yesterday's bars over and over. I've got code that looks at the bar's date and skips the rest of my processing if it's from yesterday, but I'm burning up a lot of CPU retrieving these bars from eSignal.
Please don't respond with "you should be getting streaming quotes or T&S ticks instead of continuous historical bars." I would love to use either one of those methods, but the intra-day volume info provided by those two streams is off by a huge amount (sometimes > 10%), and my algorithm depends on accurate intra-day volume data.
Comment