Announcement

Collapse
No announcement yet.

Time & Sales: 95% of lFlags = 0?

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

  • Time & Sales: 95% of lFlags = 0?

    Using Excel 2007/VBA and the API to bring in T&S on stocks, but at least 95% of the lFlags are set to 0 (Undertermined). Opening and using the T&S window in eSig gives the same result.

    This is my filter:

    tsFilter.sSymbol = "AA"
    tsFilter.bQuotes = False
    tsFilter.bTrades = True
    tsFilter.lNumDays = 1
    tsFilter.bFilterPrice = False
    tsFilter.bFilterVolume = True
    tsFilter.lVolume = 10000
    tsFilter.bFilterQuoteExchanges = False
    tsFilter.bFilterTradeExchanges = False

    It doesn't just happen with AA, either.

    What needs to be done to correct this? Does this have something to do with the conflation bit I have read about?

    George

  • #2
    Conflation only applies to quotes only and since you are only requesting trades data, it's irrelevant.

    The lFlags field from the Time&Sales structures should not be zero. We are unable to reproduce the issue below. Can you attach a code snippet showing how you are processing this field?

    Comment


    • #3
      I now know where all those lFlags=0 were coming from.

      Apparently, once after-hours trading stops, that current day's session suddenly becomes the previous day's session, and almost all of the lFlags information is 0'd out at that time. Since I was playing around with the API and T&S late in the evening, I was getting lFlags = 0. During market hours today, I did't have that problem, but did see it again this evening.

      Okay, one mystery solved.

      However, during market hours I do see quite a few lFlag values like: 16, 272, 514, 520, 1025, 1032. The majority of the time those numbers show up during pre-market and after-hours trading. The documentation I have on lFlags doesn't have any info pertaining to those values. Do you have a complete list of lFlag values you could post, or could you tell me what the above values indicate?

      Thanks,
      George

      Comment


      • #4
        The lFlags values are described at the end of chapter 4 of the Desktop API documentation. The value can be a combination of the following:

        tsfTRADEASK 0x00000001
        tsfTRADEBID 0x00000002
        tsfTRADEABOVEASK 0x00000004
        tsfTRADEBELOWBID 0x00000008
        tsfTRADEINSIDE 0x00000010
        tsfQUOTEBID 0x00000020
        tsfQUOTEASK 0x00000040
        tsfFOMUPTICK 0x00000100
        tsfFORMDOWNTICK 0x00000200
        tsfFORMT 0x00000400

        Comment


        • #5
          Okay, I think I have it.

          One of the lFlag values I was seeing in my watch list as I stepped through the code was 1032.

          The hex representation for decimal 1032 is: 0x00000408

          That corresponds to the following two lFlag values:

          tsfTRADEBELOWBID 0x00000008
          tsfFORMT 0x00000400

          I understand what all the lFlag values mean except for tsfFORMT. What does that mean?

          Thanks,
          George

          Comment


          • #6
            FORMT refers to pre/post market hours.

            Comment


            • #7
              Okay, I'm good to go.

              Appreciate your help.

              George

              Comment

              Working...
              X