Announcement

Collapse
No announcement yet.

Robi - Method to Define Last as Buy or Sell

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

  • Robi - Method to Define Last as Buy or Sell

    TWO QUESTIONS...

    Q1) Are we missing something really simple?

    We are using the desktop API to bring in basic quote info
    on 40 stocks using a loop... works fine...

    We bring in Last Price, Bid Price, Ask Price and Last Size
    into a VB form... works fine...

    We then take the Last Price and see if it is equal to or lower than the Bid Price and if it is we designate that as a sell transaction...

    And ditto with the Last Price vs Ask Price = to or higher
    is a buy transaction.. fine...

    but we are noticing a lot of transactions that come BETWEEN the Bid Price and the Ask Price... and so we cannot measure what they are (Buy? Sell?)

    So is there a method in the real time basic quote structure that we can use to ascertain whether a trade is a buy or a sell.

    NOTE: there is a field in the Quote window in the eSig app that is called uptick / downtick which does show the trade as a buy or sell - is this available in the desktop api... will be... ?

    Q2) We also requested a startTime EndTime filter on TimeStamp requests... be done soon?... by tomarrow (grin )... ?

    thanks...

    Cjames...
    **Have Stop - Will Trade**

  • #2
    Re: Robi - Method to Define Last as Buy or Sell

    Originally posted by chrisjames
    but we are noticing a lot of transactions that come BETWEEN the Bid Price and the Ask Price... and so we cannot measure what they are (Buy? Sell?)

    So is there a method in the real time basic quote structure that we can use to ascertain whether a trade is a buy or a sell.
    Whether you want to call those buys or sells is up to you I would think, since every transaction, even if at/above the ask or at/below the bid, is both a buy and a sell simultaneously.

    NOTE: there is a field in the Quote window in the eSig app that is called uptick / downtick which does show the trade as a buy or sell - is this available in the desktop api... will be... ?
    This is not in the Desktop API. I imagine they are just comparing at/above/below the ask/bid as you are, though there might be an actual uptick field sent from the exchanges (not sure). If a trade occurs between the bid and the ask and I had to classify it as a "buy" or "sell", I'd personally just use the previous value. As you know, uptick does not equal "the trade was a buy". It more or less equals "someone sold stock to someone who was willing to buy the stock at a slight premium".

    Cheers... George
    Last edited by GenSpoo; 04-10-2004, 01:01 PM.

    Comment


    • #3
      You know what, it does look like uptick/downtick info is sent via Time and Sales. Check out the flags in the TimeSalesData and two of the possible masks are tsfFORMUPTICK and tsfFORMDOWNTICK. Although I'm not sure if those are specific to FORM-T transactions and/or if they are sent by the exchange or if eSignal calculates them. Either way, something to try. I haven't played with those fields before.

      Cheers... George

      Comment


      • #4
        [QUOTE]Originally posted by GenSpoo
        Whether you want to call those buys or sells is up to you I would think, since every transaction, even if at/above the ask or at/below the bid, is both a buy and a sell simultaneously.
        [QUOTE]Originally posted by GenSpoo
        This is not in the Desktop API. I imagine they are just comparing at/above/below the ask/bid as you are, though there might be an actual uptick field sent from the exchanges (not sure). If a trade occurs between the bid and the ask and I had to classify it as a "buy" or "sell", I'd personally just use the previous value. As you know, uptick does not equal "the trade was a buy". It more or less equals "someone sold stock to someone who was willing to buy the stock at a slight premium".

        ************************************************** **
        1) Yes, at the objective level it would seem every trade is both a buy and a sell since both have to happen for a trade to take place but actually if a buy takes place at the ask or definitely above the ask then DEMAND is increasing (even if only for that one trade) and the volume for that trade therefore is DEMAND volume and the trade is therefore a BUY or a DEMAND trade and the mirror opposite for a sell or SUPPLY trade....

        the IMbalance between Demand and Supply is the essence of trading so it is very important to know if a trade is a buy(at or above ask) or sell(at or below bid) using my above criteria which is also considered the "smart money" or pro way too... anyway from what you have said i take it that the real time basic quote does not have a method to test if the trade is an uptick or downtick (i consider that another missing method in the basic real time quote struture method - frustrating). I am gathering stock on 40 or more quotes a one time so measuring back against previous values is a little out of the question plus i should not have too.

        also i cannot use time and sales because i you do not have the startTime and endTime filters since i only want to pull a small bit of info not the whole time and sales history and then loop thru it to find one time period and then do it again a second or less later...
        **Have Stop - Will Trade**

        Comment


        • #5
          Yes, at the objective level it would seem every trade is both a buy and a sell since both have to happen for a trade to take place
          I'm not trying to argue here, but "it would seem"? It doesn't just seem, it is. I understand what you are getting at, but some newer traders don't realize what happens during a transaction. You specifically asked how you could tell if a trade was a buy or a sell, not how to tell if supply or demand was increasing or decreasing. All semantics in a way I know, but I was just trying to answer the question in a straight forward way.

          So is your question whether supply or demand is increasing if a trade occurs between the bid and ask? I don't see the relevance of a tick indicator here. If the tick indicator says "up", but a trade occurs between the bid and ask, what do you say happens to supply and demand? Looks like equilibrium if anything. I don't see what good a separate tick indicator is when I have bid and ask already.

          I am gathering stock on 40 or more quotes a one time so measuring back against previous values is a little out of the question plus i should not have too.
          This is what computers do extremely well. I realize it might be nice to have an uptick member to the quote structure, but I don't see what the difficulty is in obtaining the info you need on your own with a little array holding all the previous quotes. When a new quote arrives, compare it to what is in the array to get your supply/demand info, then store the new quote where the old quote was, rinse and repeat.

          Cheers... George

          Comment


          • #6
            On Da Other Hand...

            GenSpoon wrote:
            So is your question whether supply or demand is increasing if a trade occurs between the bid and ask? I don't see the relevance of a tick indicator here. If the tick indicator says "up", but a trade occurs between the bid and ask, what do you say happens to supply and demand? Looks like equilibrium

            Probing questions - I like - (thank you for your, time, brain, nudges, view)

            (One thing I should add is that all these trades we are grabbing are filtered for block sizes of 10,000+ or greater - this is working fine - I just wanted to add for clarity - method of Last Trade Size works great)

            1) OK - If a BLOCK trade occurs between the bid and ask and we actually had a tick indicator/method that says -up- (so we would know it ¡s a buy) then we would know that although demand is not increasing at that moment, since a premium is not being paid (a purchase at or above the ask), we would know the stock available for purchase from the specialist (NYSE) or the market makers (NAZ) has decreased so there is a greater than even (>50%) chance of demand (blocks above the ask) increasing VERY soon - as in gap ups or wide spread up bars with strong buys above the ask following right away or soon after - the specialists/market makers will raise the price themselves even if the outside paper does not do it right away -

            So THAT is where the value lies - potential/future demand is building - this is very important to know - so as to get in early - not after the market moves - same for sells.

            GenSpoon wrote:
            if anything. I don't see what good a separate tick indicator is when I have bid and ask already

            2) Will not work - Let us say were querying the stock PG (Proctor Gamble) and the bid is 106.40 and the ask is 106.45 and the previous trade is between the spread at 106.42(in your array) and the Last Trade (now trade) is 106.43 then yes you would know that is a buy trade. But what if the previous trade was 106.42 and the Last Trade was also 106.42 (very common!) is this a buy or sell? - you can not tell - this is why the exchange provides an upTick and downTick indicator flag so most financial software CAN know - so yes it is out of the question because its not a workable solution but I did love the gomer pyle explanation of computer usage and arrays 101 - (grin)

            3. So in summary: an uptick downtick indicator method should have been designed into the basic quote structure from the START

            4. Ditto with the startTime and endTime filters for the Time and Sales quote structures
            **Have Stop - Will Trade**

            Comment


            • #7
              Re: On Da Other Hand...

              Originally posted by chrisjames
              2) Will not work - Let us say were querying the stock PG (Proctor Gamble) and the bid is 106.40 and the ask is 106.45 and the previous trade is between the spread at 106.42(in your array) and the Last Trade (now trade) is 106.43 then yes you would know that is a buy trade. But what if the previous trade was 106.42 and the Last Trade was also 106.42 (very common!) is this a buy or sell? - you can not tell - this is why the exchange provides an upTick and downTick indicator flag so most financial software CAN know - so yes it is out of the question because its not a workable solution but I did love the gomer pyle explanation of computer usage and arrays 101 - (grin)
              Why not put a tick indicator in your storage array? I still don't see the difficulty (maybe I'm just being dense) and, BTW, I'm not arguing for or against putting a tick indicator in the quote structure, just trying to see what it is I don't understand about how what you are after is different from what I think you are after.

              UptickFlag = false # just some place to start
              106.40 x 106.45
              Trade ==> 106.40 # UptickFlag = false
              Trade ==> 106.43 # UptickFlag = true
              Trade ==> 106.42 # UptickFlag = false
              Trade ==> 106.42 # Last == Previous so no change in UptickFlag
              Trade ==> 106.42 # still no change
              Trade ==> 106.40 # UptickFlag = false
              Trade ==> 106.45 # UptickFlag = true
              Etc.

              Is this not what you are looking for?

              Cheers... George

              Comment


              • #8
                GenSpoo shows that, although not as desired, there is a programmatic solution to #3, and considering that there has only been one request to have this feature, I do not think that it will be part of the next release.

                #4 (filters) is in the development queue for both correcting the issue in the TimesSalesFilter function and adding to BarData.

                Comment


                • #9
                  This is a great thread and there has obviously been a lot of thought put into it. We have found there are many different ways to treat the trades that occur between the bid and ask. It is not an easy issue to deal with at all. The solution suggested here makes sense and would be a viable solution.

                  The idea of gauging buy/sell pressure is a very valid one. We created a tool that does just this and gauges in real time the buy/sell pressure as a result fo the buyer being more aggressive and lifting the offer or the seller being more aggressive and hitting the bid. People discount the fact that this is important information because it is composed of basic trade information and doesn't create some fancy indicator. Most people only focus on price, some price and volume, but few go the next step and classify which side of the market volume was transacted. In our opinion, this is crucial information and should be part of every traders arsenal, especially as bid/ask spreads become tighter and markets become more efficient.

                  At our website we go into more discussion concerning these points for anyone interested.
                  Trevor
                  www.marketdelta.com

                  Comment


                  • #10
                    You all have brought up an interesting point and we are taking this topic into consideration for a new product we expect to release this year. I cannot offer any additional information on this product, but it deals with the information you are discussing.

                    Comment


                    • #11
                      If you don't feel like waiting for eSignal to develop the technology to address this need, you should check out MarketDelta, an esignal third party vendor. Our patent pending technology addresses price action and time and sales in a very graphical and intuitive way.
                      Trevor
                      www.marketdelta.com

                      Comment

                      Working...
                      X