Announcement

Collapse
No announcement yet.

RequestHistory Bars Skipped

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

  • RequestHistory Bars Skipped

    When requesting 1 minute bars with RequestHistory; I've noticed that if there are no trades, a bar is not provided for those minutes. Since I'm requesting 1 minute bars, I would have expected a bar every minute regardless of the volume.

    The code I'm writing expects a new bar every minute. Is there a way to force the API to do this? It's possible for me to write some extra logic to create a 'fake' bar if no bars are returned from the API, but it would be much better if it's possible from the API.

    Here is an example where minutes 3:03-3:07 and 3:09 are skipped: RequestHistory("HPQ","1",btDAYS,1,-1,-1)
    --------------------------
    HPQ
    5/9/05 3:10:00 PM 20.74 20.74 20.7405 20.74
    5/9/05 3:08:00 PM 20.75 20.75 20.75 20.75
    5/9/05 3:02:00 PM 20.74 20.74 20.74 20.74
    5/9/05 3:01:00 PM 20.74 20.74 20.74 20.74
    5/9/05 3:00:00 PM 20.74 20.74 20.74 20.74
    -------------------------

    Thanks,

  • #2
    There is no way to tell the API to insert bars for periods where no trades occured. As far as I know even the main eSignal app doesn't display data where no trades occurred.

    I assume when you insert your own zero volume bars you set the open/high/low/close to the close of the previous bar?

    Cheers... George

    Comment

    Working...
    X