Announcement

Collapse
No announcement yet.

How can I know when no data is available from history call?

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

  • How can I know when no data is available from history call?

    Hi There,

    I have discovered that calling eSignalHooks.get_RequestHistory(...) with a ticker that has no activity (and hence, no data), I never receive a callback, and and immediate check of eSignalHooks.get_IsHistoryReady(handle) returns false.

    This is causing me to never know that there is a "No Data" condition like what is displayed in the application.

    For instance, the symbol "SHMI" is valid, yet, there is no data available at least for the past 6 months.

    Does anyone know of a way to test for the "No Data" condition? The desktop application returns immediately with "No Data", but in my code, the callbacks never fire and the immediate check for HistoryReady says FALSE.

    Best regards,
    -Sean

  • #2
    I use a Wait/Post sequence to determine if the handler has been called with data for a requesthistory call. Following the request for history data, I test to see if the data was found in the cache; if not, I then issue a Wait that causes the requesting thread to give up control. When the handler has finished gathering the data requested for the particular ticker ( handle ID), the Handler code posts the waiting thread and causes it (the thread that issued the request history) to resume and allows it to process the received data. If the Wait interval (e.g., 2 seconds) expires without being posted, the requesting thread is restarted and is able to determine that it ws the time interval expiration that caused the resumption (i.e., no data was received in the handler).

    I hope this helps.

    Comment


    • #3
      Thank you for the reply! The one thing with doing that that makes me nervous is that a timeout is used to make the distinction that no data is available. This seems fairly unreliable.

      For instance, what if the network were saturated and it took 10 seconds to start receiving data? Then, the assumption would be made that no data exists, when in fact, it was just slow getting there.

      I was hoping for a reliable way to know that "No Data" is the result of a history request..

      Thanks again!
      -Sean
      Last edited by CleverCoder; 07-21-2006, 06:35 AM.

      Comment


      • #4
        You could always make a determination to increase the timeout value and/or reissue the wait. I set up a runtime parameter that allows me to vary the wait duration. Even under heavy network load, I found 2 seconds to be enough for my connection and machine.

        Comment


        • #5
          Thanks for the reply. It seems that for our processing, we are digesting a lot of data at a time. My app is responding to the callbacks, but with a 30 second timeout, and processing about 1000 requests for data overnight, I still had about a dozen false positive "No Data" situations. I verified them by hand, and it seems that I had one at 3:30 AM and the rest occurred around 7:30 AM. My guess is due to the increased activity on eSignal's servers at that time of day.
          I would like a 100% foolproof way to know that no data is available, or that the request is complete..

          Still searching.
          Again, thanks for the feedback!
          -Sean

          Comment


          • #6
            I have seen a few instances wherein the Handler is entered, but the Bar count is 0. I retried the function with a break in the code and verified the results. It was pre-market when the server's load should have been fairly light. When I ran the data query for the stock after the market was opened the handler was entered with bars.

            I have seen one other strange behavior. Early this morning I requested 100 weeks of history data for symbol BHI. The first time eSignal only returned 9 bars (weeks) of data. I retried the transaction later in the morning and was given 29 bars of data. I retried it at 3:50PM EDST and received 58 bars. Be wary of queries. On a whim, I just retried the request and got back 78 weeks for BHI (at 4:07PM).

            Comment


            • #7
              Interesting indeed.. This is good to know as we dive further into this project.

              Knowing this, I will be doing some verification. I would be interested in hearing eSignals response to your observations and my issue.

              thanks again!!
              -Sean

              Comment


              • #8
                I wouldn't expect much from eSignal support. Their support people typically do not have a solid background in problem resolution if it goes beyond proper usage of eSignal. Unless their development people get involved, I wouldn't expect much help.

                Comment

                Working...
                X