• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bid-Ask Volume vs Buy-Sell Volume ???

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

    Bid-Ask Volume vs Buy-Sell Volume ???

    Hi,

    A client requests me a Volume Delta indicator.
    (Volume Delta = Ask Volume - Bid Volume)

    I take the idea from BuySellVolume, a default indicator by NinjaTrader.

    As far as I know, the way NinjaTrader coded BuySellVolume is based on the well known definition:
    • Buy Volume = Ask Volume (the volume that occurs at the Ask price)
    • Sell Volume = Bid Volume (the volume that occurs at the Bid price)


    Source: http://daytrading.about.com/od/daytr...dAskVolume.htm

    So:
    Buy Volume = Ask Volume
    Sell Volume = Bid Volume
    And therefore:
    Volume Delta = Buy Volume - Sell Volume
    (I mean the buy & sell volumes computed by BuySellVolume indicator)
    Am I correct about this?

    Thank you very much.
    Pi
    ninZa
    NinjaTrader Ecosystem Vendor - Ninza

    #2
    http://www.ninjatrader.com/support/f...buy+sell+delta

    Comment


      #3
      Hello NinZa,

      Thank you for your post and thanks to Sledge for answering.

      That is a fair assessment for the Volume difference for Buy and Sell.

      If the client is looking for this kind of Delta, then when this is positive value there are more buys then sells and vice versa for negative value.
      Cal H.NinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_Cal View Post
        Hello NinZa,

        Thank you for your post and thanks to Sledge for answering.

        That is a fair assessment for the Volume difference for Buy and Sell.

        If the client is looking for this kind of Delta, then when this is positive value there are more buys then sells and vice versa for negative value.
        Thanks sledge and Cal.

        I just ask for a confirmation of the formula used to calculate volume delta. The programming is straightforward.

        As Cal said, using the formula: volume delta = buy volume - sell volume is a fair assessment.

        I ask this question because the client says the volume delta of my version (which uses buy & sell volumes of the default BuySellVolume indicator) is different from Gomi's version. I'm not sure Gomi used the same formula. So I just want to know if there is 1 or many formulas to compute the volume delta.

        Thanks.
        Pi
        ninZa
        NinjaTrader Ecosystem Vendor - Ninza

        Comment


          #5
          You will probably need to use the OnMarketData() method for more accuracy and to match Gomi.

          Dan
          eDanny
          NinjaTrader Ecosystem Vendor - Integrity Traders

          Comment


            #6
            Originally posted by ninZa View Post
            Thanks sledge and Cal.

            I just ask for a confirmation of the formula used to calculate volume delta. The programming is straightforward.

            As Cal said, using the formula: volume delta = buy volume - sell volume is a fair assessment.

            I ask this question because the client says the volume delta of my version (which uses buy & sell volumes of the default BuySellVolume indicator) is different from Gomi's version. I'm not sure Gomi used the same formula. So I just want to know if there is 1 or many formulas to compute the volume delta.

            Thanks.
            Pi
            That will depend on how you (same applies to NT and Gomi) are defining BuyVolume and SellVolume. Is there NeutralVolume/UnknownVolume/UnclassifiedVolume, and how does it affect your calculations?

            Comment


              #7
              Originally posted by eDanny View Post
              You will probably need to use the OnMarketData() method for more accuracy and to match Gomi.

              Dan
              Can you explain the difference between the OnMarketData and OnBarUpdate approaches, Dan? I have not investigated this issue thoroughly, but at a glance I see both of them use the same data:
              • OnBarUpdate: get the last price via Close[0], and bid, ask prices via GetCurrentBid(), GetCurrentAsk()
              • OnMarketData: get the last, bid, ask prices via MarketDataEventArgs


              The same data, just the way we access them is different, so it should be identical. Am I wrong at some point, Dan?


              =====================================


              Originally posted by koganam
              That will depend on how you (same applies to NT and Gomi) are defining BuyVolume and SellVolume. Is there NeutralVolume/UnknownVolume/UnclassifiedVolume, and how does it affect your calculations?
              Yes I believe it's the way we define Buy vol and Sell vol. I'm not sure what neutral, unknown, unclassified volumes mean. The way I code my Volume Delta is the same as BuySellVolume of NT:
              Code:
              if (Close[0] >= GetCurrentAsk())
              	buys += tradeVol;
              else if (Close[0] <= GetCurrentBid())
              	sells += tradeVol;
              Buy Volume = the volume that occurs at the Ask price (last price >= Ask price)
              Sell Volume = the volume that occurs at the Bid price (last price <= Bid price)

              Can you make a comment on this, koganam?

              A problem that seemed simple has turned into a real headache to me

              Thank you very much for the kind help from you, fellow vendors.
              Pi
              Last edited by ninZa; 01-04-2015, 06:04 PM.
              ninZa
              NinjaTrader Ecosystem Vendor - Ninza

              Comment


                #8
                Originally posted by ninZa View Post
                Can you explain the difference between the OnMarketData and OnBarUpdate approaches, Dan? I have not investigated this issue thoroughly, but at a glance I see both of them use the same data:
                • OnBarUpdate: get the last price via Close[0], and bid, ask prices via GetCurrentBid(), GetCurrentAsk()
                • OnMarketData: get the last, bid, ask prices via MarketDataEventArgs


                The same data, just the way we access them is different, so it should be identical. Am I wrong at some point, Dan?


                =====================================




                Yes I believe it's the way we define Buy vol and Sell vol. I'm not sure what neutral, unknown, unclassified volumes mean. The way I code my Volume Delta is the same as BuySellVolume of NT:
                Code:
                if (Close[0] >= GetCurrentAsk())
                	buys += tradeVol;
                else if (Close[0] <= GetCurrentBid())
                	sells += tradeVol;
                Buy Volume = the volume that occurs at the Ask price (last price >= Ask price)
                Sell Volume = the volume that occurs at the Bid price (last price <= Bid price)

                Can you make a comment on this, koganam?

                A problem that seemed simple has turned into a real headache to me

                Thank you very much for the kind help from you, fellow vendors.
                Pi
                What about the volume that occurs on the inside: neither at the Bid nor the Ask? That is what I mean by UnclassifiedVolume.
                Last edited by koganam; 01-05-2015, 08:29 AM.

                Comment


                  #9
                  Originally posted by koganam View Post
                  Waht about the volume that occurs on the inside: neither at the Bid nor the Ask? That is what I mean by UnclassifiedVolume.
                  That kind of volume is simply ignored, Koganam. We neither credit it to buy vol nor to sell vol.

                  Thanks.
                  Pi
                  ninZa
                  NinjaTrader Ecosystem Vendor - Ninza

                  Comment


                    #10
                    Originally posted by ninZa View Post
                    Can you explain the difference between the OnMarketData and OnBarUpdate approaches, Dan? I have not investigated this issue thoroughly, but at a glance I see both of them use the same data:
                    • OnBarUpdate: get the last price via Close[0], and bid, ask prices via GetCurrentBid(), GetCurrentAsk()
                    • OnMarketData: get the last, bid, ask prices via MarketDataEventArgs


                    The same data, just the way we access them is different, so it should be identical. Am I wrong at some point, Dan?
                    I seem to figure out the difference. The data we get from the 2 approaches at any point are identical. However, the accumulation of volumes may be different because:
                    • OnMarketData: our volume computation is executed when ANY of the bid, ask, last prices changes.
                    • OnBarUpdate: our volume computation is executed ONLY when the last price changes. Therefore, sometimes the bid or ask changes and makes a qualifying volume but the volume is ignored in our computation.


                    Am I right, Dan?

                    Thanks.
                    Pi
                    Last edited by ninZa; 01-05-2015, 03:27 AM.
                    ninZa
                    NinjaTrader Ecosystem Vendor - Ninza

                    Comment


                      #11
                      You are correct in understanding Pi, the OnBarUpdate will need price updates.
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by NinjaTrader_Bertrand View Post
                        You are correct in understanding Pi, the OnBarUpdate will need price updates.
                        Thanks.
                        I'm editing the algorithm accordingly.
                        ninZa
                        NinjaTrader Ecosystem Vendor - Ninza

                        Comment


                          #13
                          Originally posted by ninZa View Post
                          That kind of volume is simply ignored, Koganam. We neither credit it to buy vol nor to sell vol.

                          Thanks.
                          Pi
                          I must not have been clear. That is my point. You ignore it. Does Gomi?

                          Comment


                            #14
                            Originally posted by koganam View Post
                            I must not have been clear. That is my point. You ignore it. Does Gomi?
                            I don't know anything about Gomi's algorithm

                            As Dan pointed out, Gomi uses OnMarketData approach.
                            I have edited the indicator using OnMarketData and sent it to my client.

                            Waiting for his reply whether my version and Gomi's produce the same results .

                            Thank you for your help, Koganam.
                            ninZa
                            NinjaTrader Ecosystem Vendor - Ninza

                            Comment


                              #15
                              Today I have just released Volume Delta as the latest free indicator by ninZa.co.

                              Description: http://ninza.co/product/volume-delta
                              File: Download now

                              Thank you for all your helps and supports
                              Pi
                              ninZa
                              NinjaTrader Ecosystem Vendor - Ninza

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by saeed, Today, 12:32 PM
                              3 responses
                              33 views
                              0 likes
                              Last Post NinjaTrader_PatrickG  
                              Started by motog4, Today, 11:42 AM
                              3 responses
                              20 views
                              0 likes
                              Last Post NinjaTrader_PatrickG  
                              Started by derivtrader, Today, 11:20 AM
                              5 responses
                              27 views
                              0 likes
                              Last Post derivtrader  
                              Started by TAJTrades, Today, 10:34 AM
                              1 response
                              10 views
                              0 likes
                              Last Post NinjaTrader_ChrisL  
                              Started by timcjpfx, Today, 10:20 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Working...
                              X