Announcement

Collapse
No announcement yet.

Question on BarsChanged and BarReceived events

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

  • Question on BarsChanged and BarReceived events

    I'm capturing the BarsChanged and BarsReceived events just fine. I have a question about what to expect with the esignal Desktop API and the events.

    Assuming I make a RequestHistory call (e.g., RequestHistory("GOOG", 5, BARS, 20, -1, -1)

    1. If I get constant data for the candle as it's being built using BarsChanged, which works just fine. What impact should the numBars (20) have in the RequestHistory call above?

    2. I know that the BarsReceived event gets the last candle value after I call RequestHistory. That seems to work pretty well. The only question is when can I expect the final 5 minute candle value to be sent? Will final candle values continue to get sent via the BarsReceived event for the rest of the day, or is it expected that I monitor the BarsChanged to fingure that out? From what I've noticed BarsReceived only happens initially, but I thought I would ask. Is there some other approach that I should be looking at for this?

    Thanks,
    Burt

  • #2
    Burt,
    1. If I get constant data for the candle as it's being built using BarsChanged, which works just fine. What impact should the numBars (20) have in the RequestHistory call above?
    In the sample code the numBar (20) should indicate that you'll received Twenty 5 minute historical bars which are then processed by the OnBarReceived event.

    2. I know that the BarsReceived event gets the last candle value after I call RequestHistory. That seems to work pretty well. The only question is when can I expect the final 5 minute candle value to be sent?
    Will final candle values continue to get sent via the BarsReceived event for the rest of the day, or is it expected that I monitor the BarsChanged to fingure that out? From what I've noticed BarsReceived only happens initially, but I thought I would ask. Is there some other approach that I should be looking at for this?
    The OnBarReceived should process all 20 bars. Then OnBarChange would continue to update the most current bar with any new data coming in.

    AveryH
    eSignal Support

    Comment

    Working...
    X