Announcement

Collapse
No announcement yet.

Expired contracts symbol formats

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

  • Expired contracts symbol formats

    I am trying to import data for expired contracts and can't seem to get the symbols right. I am using following format: two letter symbol + expiration month code + four-digit year. For example, I get something like NDH2004. When I verify this symbol with function IsValidSymbol(), it always returns false. Is this incorrect format? If so what format should I use?

    Thanks.

  • #2
    mstennicke
    There should be a space between the root symbol and the month/year code. For example ND H2004
    Alex

    Comment


    • #3
      Alex, thanks so much for your reply, this format worked. Although IsValidSymbol() functions still returns false.
      Just a comment that help in eSignal clearly states: [For expired contracts in historical charting, a one- or two-letter symbol, space (depending on a year format), expiration month code, followed by a two- or four-digit year. If a four-digit year is used, no spaces should appear in the symbol.] It probably should be changed to avoid confusion in the future.

      Comment


      • #4
        Alex, I think I got happy too early. I am using RequestTimeSales() function to get data, but it gives me data only for contracts that not yet expired. For expired contracts I get a handle back but number of bars is always zero. Am I using a wrong function? I tried using RequestHistory() but with that I didn't even receive a callback. What should I be doing to get expired contracts data?
        Thanks.

        Comment


        • #5
          mstennicke
          Sorry but I am completely unfamiliar with the Desktop API and was only indicating the format of the symbol as used in eSignal. You may want to redirect your question(s) to the moderators of this forum
          Alex

          Comment


          • #6
            The API just passes the symbol on, so the format to use in the API is the format that you use in the main app. I'm not sure how IsValidSymbol is implemented, but I think it does something like request a quote from the server. If that is the case, it would explain why expired symbols cause IsValidSymbol to return false.

            As for the time and sales, I doubt eSignal saves them (or at least makes them publicly available) for expired contracts which explains the zero bars. Since even only current contract time and sales is 10 days long, you wouldn't get a complete T&S for expired contracts even if they did save them.

            Remember that the API goes through the main app. So an easy way to see if something not working is because of the API is to open a window in eSignal and see what happens. When I type ND H2004 in a time and sales window I get a "No Data" response which tells me that I wouldn't get anything via the API either.

            Cheers... George

            Comment

            Working...
            X