Announcement

Collapse
No announcement yet.

Why receiving two bars on continuous requests?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why receiving two bars on continuous requests?

    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.

  • #2
    You don't have to retrieve the bar everytime. If you just want the current bar, only call retrieve for bar zero. The data is cached in the Data Manager, so it isn't constantly sending yesterday's data over the Internet to your computer either.

    Cheers... George

    Comment

    Working...
    X