Announcement

Collapse
No announcement yet.

Help with historical data from the Desktop API

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

  • Help with historical data from the Desktop API

    I am in need of some help if there is someone out there that can give me a hand with this question I would really appreciate it.

    I am pulling historical Open High Low and Close prices for stocks into my custom application through the Desktop API and it is working ok with historical dates. When I try to pull the same data for the current day I can only find the current bid and ask prices. I know the data is there because the charting program has to be able to use it but I can' t find it. I want to be able to pull the current Open High Low and Last price for when the market is open and data is being updated and the Open High Low and Close prices for when the market has closed for the current day. Historical data is find it is the current data I am having trouble with.

    Can anyone help me please?

    Thanks,

    John Jagerson
    [email protected]
    (801) 623-1977

  • #2
    Real-time data feed example

    jjagerson,

    Historical price records are for any before the current day and a few hours after the market closes, the exchanges send a record for the current day.

    Your best option is to request real-time bar data (See Chapter 5 of the Developer Reference) and use logic to determine and maintain the O,H,L,La prices. Be careful of erroneous ticks that are sent from the exchanges.

    I uploaded a form from an app that I know worked at some point and am working on improving the documentation to show a better example of how to do this.

    I hope this helps.

    Robi
    Attached Files

    Comment


    • #3
      I think you need to make a clear seperation in your code between the real time tick and the historical tick.

      it's actually easy for the 5Minutes or 1minutes data because there is two seperate events. onbarsreceived and onbarschanged

      for time and sales it's a little more complicate because you need to use the same event but two different functions:
      getnumtimedalesbars and getnumtimesalesRtbars, the event is ontimesaleschanged. it does work...

      if you are using a borland product there is another trick.

      Comment

      Working...
      X