Announcement

Collapse
No announcement yet.

OnBarsReceived and IsHistoryReady question

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

  • OnBarsReceived and IsHistoryReady question

    Will OnBarsReceived be fired and will IsHistoryReady return true ONLY when every single history bar requested has been received? Or, can OnBarsReceived fire and IsHistoryReady return true even if just part of the history has been retrieved so far (while the rest is still on its way from the server)?

    The reason I ask is because it will be easier to port my app if I can get some sort of fixed "first bar in time" index, which I can't do if there is a chance that eSignal will insert a few more bars at the front (i.e. before the first (i.e. oldest) historical bar). Having the most recent bars index as always zero causes a few issues I need to work around in the port. In the main eSignal app you can sometimes watch as the history fills in when first loading a symbol. I need a way to know that the history is complete and that there will be no more history coming.

    Alternately, possibly adding equivalent functions to the history bars as those that exist for the time and sales data could be helpful. Specifically the GetNumTimeSalesBars and GetNumTimeSalesRtBars. At least with those, I can tell for myself if the number of bars has grown because of new realtime data, or if it is just because more backfill data has arrived.

  • #2
    IsHistoryReady will return true when the entire request by RequestHistory has been fulfilled.

    OnBarsReceived will fire everytime bars come in. When RequestHistory is called, the bars are transmitted from the servers to eSignal in segments. OnBarsReceived will be called for every segment that is received.

    Regarding the most recent bar always being zero, you write a function that maps your bar indexing to the way we are indexing bars.
    Matt Gundersen

    Comment


    • #3
      IsHistoryReady will return true when the entire request by RequestHistory has been fulfilled.

      Awesome. That's what I wanted to hear.

      Regarding the most recent bar always being zero, you write a function that maps your bar indexing to the way we are indexing bars.

      Yeah. I was going to do that, and now I can since I know that nothing can be inserted in the front after IsHistoryReady returns true. I couldn't do the mapping function I would need if the bars coming from esignal could slide forward AND backwards since I would have no static index value to set as a reference.

      Comment

      Working...
      X