Announcement

Collapse
No announcement yet.

XMLGetBasicQuote - Where can I find info?

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

  • XMLGetBasicQuote - Where can I find info?

    I am a new user with the initial objective of generating a simple "snapshot" of the market 3 - 4 times during the trading day and a final download for posting final closing prices. The file I need to create is as follows (prices are since the open):

    symbol, open, high, low, close, volume (cumulative since open)

    This should be simple, but isn't. The code retrieves price and volume correctly sometimes and then sometimes it doesn't work at all or works partially retrieving only random symbols.

    I am using RequestHistory(symbol, 390, btBARS, 1, 390, 780) (California time) in C++ code. The symbol list right now is only about 600 stocks but will expand to about 3000+ when I am done. That is another problem. ReleaseHistory/ReleaseSymbol only works some of the time so I sometimes get an error about my symbol limit (not always though). There are so many issues going on it is hard to know which hole to plug first.

    I see others are recently having problems with the same issues I have encountered and you suggested XMLGetBasicQuote. Ok, I will try anything. Where is the documentation? I tried the group Robi suggested and could find no mention.

    These quotes need to be realtime, but I don't care if it takes a few minutes to pull the data. As long as it is completely accurate and complete for that time's snapshot.

    All help is appreciated.
    Last edited by masterdata; 04-20-2005, 10:23 PM.

  • #2
    I downloaded and installed version 7.9. Equis apparently addresses many issues in this version. It works significantly better.

    Anyway, back to my immediate dilemma. I think I have figured out a solution that will work to my satisfaction (actually, it works great).

    To get my open, high, low, close, and volume "snapshot" history data, symbols need to be run through eSignal twice. The first loop loads the symbols in eSignal. The second loop of the same symbols retrieves the data flawlessly. Then I bring in the next group doing the same and so on until I get the data for each symbol in my list no matter how long. I do a ReleaseHistory/ReleaseSymbol on the second pass. The number of symbols in each loop can be set to my symbol limit (currently 200). By the way, either ReleaseHistory or ReleaseSymbol or both work consistently in version 7.9 (no exit crashes either). Excellent.

    I have only done somewhat thorough "preliminary" testing, but I feel confident this will work. The extra run time involved is virtually nill. Its very fast, at least for my needs.

    I will be making this data run initially two or three times during the trading day and then a couple of times after the close. By having my code automatically set the end time parameter in RequestHistory to say 720 (noon California time), I get a "perfect" OHLCV snapshot of the 12:00 noon quote on all issues in my list.

    I am still open to other solutions, but I believe this one will work. Suggestions are welcome.

    Comment


    • #3
      Glad to hear that you found a solution. When you do the first loop, do you use RequestSymbol? And what is your interval in RequestHistory?

      When you do your loops, check the symbols in the Data Manager. I bet the first one places it in the DM and the second actually fetches the data.

      Comment


      • #4
        Progress on getting OHLC quotes

        When I posted previously, I had only tried manually recreating what I thought might work. Last night I got the basic code in place and it works perfectly (so far, at least).

        I do not use RequestSymbol at all. I use RequestHistory twice. The first time loads the symbol into eSignal. The second time retrieves the data (by the way, what do you mean by DM?). I am also not sure what you mean by interval, I do 50 symbols per loop. The first loop not only places the symbol in eSignal, but also tries to retrieve data (only occasionally is it at best partially successful on this first pass). If data is not retrieved for the symbol in this first loop, the symbol is placed in a "retry" file. The second pass opens this "retry" file and again does a RequestHistory. I allow it to request the data up to 50 times per symbol before writing the symbol to an "error" file and moving on. Usually, much to my surprise, it never needs the additional requests but gets the data on the first pass. The symbol count in eSignal (lower right corner) never exceeds the loop size of 50 (expected) and drops back to one immediately on completion. Quotes on 550 stocks take less than 15 seconds. No timers or caches or anything fancy, just a straight through program. Not elegant at all, but, subject to more testing and refinement, it seems to work better than expected and certainly more than fast enough for my needs.

        Hope this helps someone else. I was increasingly frustrated for days until I thought of this method.
        Last edited by masterdata; 04-22-2005, 08:16 AM.

        Comment


        • #5
          ReleaseHistory/ReleaseSymbol

          I have not changed the way I am using ReleaseHistory/ReleaseSymbol after getting the quote. Last night and this morning they worked fine keeping the symbols well under my 200 symbol limit (actually around fifty max then back to one on completion). I am getting OHLC quotes on 550 stocks in loops of 50 at a time.

          Now, on the first run, I am getting several messages that my symbol limit is reached (also showing 200 in the lower right corner of eSignal). That is strange enough, but if I keep eSignal open and do a second run or more, it completes without error (no error messages) even though it continues to show 200 in the lower right corner of eSignal. It stays at 200 even when the run is completed and after ReleaseAllHistory() in addition to the symbol specific ReleaseHistory.

          Any ideas are appreciated.

          Comment


          • #6
            ReleaseHistory/ReleaseSymbol - MORE

            OK, Now I am baffled. I just opened an Excel spreadsheet with eSignal's macro enabled for quotes, that gets real time quotes on about 130 issues. Then I closed it and reloaded and ran my API code. ReleaseHistory/ReleaseSymbol are now working again! I did not touch the code. The symbols number in the lower right corner went to a max of about 120 then back to two on completion of the run. Quotes are perfect, no symbol limit errors. What is going on? Why would opening and closing the spreadsheet "fix" the problem? Your help is appreciated.

            Addendum (one hour later): Now even that does not work. I am back to the square one. ReleaseHistory/ReleaseSymbol do not work. I have not changed my code from when it was working perfectly.
            Last edited by masterdata; 04-22-2005, 12:44 PM.

            Comment


            • #7
              Have you tried using ClearSymbolCache()?

              Check the symbols in the Data Manager (Data->Symbols) to see if they go away.

              Comment


              • #8
                No they don't. That is the problem. Even when all eSignal related programs are shut down, the 200 symbols will not be release unless I reboot. Nothing I can think of or have tried releases the symbols without a reboot. Then at other times, everything works fine. The same unchanged code on my end works at times and at other times does not with symbols and histories impossible to release. Yes, I use ClearSymbolCache() in my code at the beginning, mid-sections and end of the program. I also use ReleaseAllSymbols, ReleaseSymbol, ReleaseHistory, and quotesPending.erase all in loops to issue multiple consecutive times.

                Comment


                • #9
                  Are those symbols in your eSignal application in a Quote window?

                  Comment

                  Working...
                  X