Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Delta Buy/Sell Volume

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

    #91
    Hi Ben,

    Today I am running the indicator on two computers, one with a real time ZenFire feed and the other one with real time ZenFire (primary connection - connected first) and Interactive Brokers feeds.

    There is a big difference between the two charts when in theory they should be identical. I also have a Buy/Sell Volume indicator on both systems and this one does look identical.

    A possible explanation is that the Delta indicator on the ZenFire / IB computer is being calculated from the bid / ask / trade data from the secondary feed from IB. As IB aggregates their tick data this would account for the difference.

    At the end of the day I will run the replay on the machine with the ZenFire only feed and see if there is a difference in the cumulative total at the end of the day and let you know the result.

    Comment


      #92
      Multi broker discrepancy

      Hi Ben,

      I have attached 3 charts:
      1. Real time chart with Cumulative Bid Ask volume and delta as collected with ZenFire feed.
      2. Market Replay chart of Cumulative Bid Ask volume and delta as collected with ZenFire feed.
      3. Real time chart with Cumulative Bid Ask volume and delta as collected with ZenFire primary feed and Interactive brokers backup feed.

      As you can see charts 1 and 2 are almost exactly the same. There are small differences visually and what you cannot see from the charts is the final cumulative delta value for the live feed was almost half that of the market replay (-1109 vs around -2000 contracts). This would seem more like a scaling problem that pops up during the replay. No ideas how to explain that one.

      Chart 3 (the chart with the black background) is quite different from the other two in the shape of the cumulative delta. You can see it looks like it is using different values to calculate the delta as shown by the two blue circles marked on the chart. There is a large discrepancy between the delta calculated and the corresponding buy / sell volume indicator. This suggests to me that the delta indicator is picking up the IB feed trade data for the calculation.
      Attached Files

      Comment


        #93
        Hi Ben,

        Thanks for the updated version of cumulative delta. I tried to test this, but the cumulative version is harder to test.

        Would it be possible you can post theupdated version of indicator which plots the delta (column delta, which is "ask-bid" volume for the particular bar) of the bar as a histogram,after the bar is complete. It would be easier to test this and would be helpful. Trying to test this using a 1 min overnight ES time and sales.

        Thanks
        Commodity_trader

        Comment


          #94
          Why not just set the bid/ask delta to a bar instead of dot in the indicator settings? Also you can set the cumulative to transparent if you just want the Delta Diver bars.

          Comment


            #95
            Hi Pdawg

            Thanks for the suggestion. But do you know, if the dot is printed as "column delta" value after bar is completed? So that it represents the delta of the particular bar, after the bar is complete.

            Thanks
            Commodity_trader

            Comment


              #96
              Excellent info Tip2012...thanks for the work you've contributed on this one. I'm going to have to think about this one a little more.

              Also (CommodityTrader and Tip2012), what I'll do is program a new version that dumps the raw data the indicator receives to a text file. And, if you like, I can dump the resulting calculated values to another text file if you want to be able to refer to the actual numbers (with timestamps on them).

              Let me know,
              Ben

              Comment


                #97
                Hi Ben,

                Yes, that would be helpful for testing purposes. Also if you can give a user option or anything similar to just plot the "column delta" (after the bar is complete) of the bar as histogram it would be helpful too.

                Thanks
                Commodity_trader

                Comment


                  #98
                  Originally posted by commodity_trader View Post
                  Hi Pdawg

                  Thanks for the suggestion. But do you know, if the dot is printed as "column delta" value after bar is completed? So that it represents the delta of the particular bar, after the bar is complete.

                  Thanks
                  Commodity_trader
                  Yes it is delta per completed bar not cumulative

                  Comment


                    #99
                    Data dumping indicator for investigators

                    Ok investigators...here's the data dumping indicator.

                    This indicator can create two text files in the file paths you specify. One for the Raw data it receives, and the other is the cumulative total it plots.

                    WARNING! This indicator appends data to the text files you specify for output. This means it writes to your harddrive! Take caution to ensure you type the correct file names into this indicator. You are responsible for the file names you specify! MAKE SURE YOU CHOOSE FILE NAMES THAT ARE NOT IDENTICAL TO EXISTING FILES THAT COULD BE DAMAGED BY THIS INDICATOR. Be warned!

                    (was that clear enough???)


                    Also, this indicator gives you the option to turn-off/on the cumulative calculation all together.

                    Finally, if you do not want to create either of the two text files, just blank out the file paths given as parameter inputs.


                    Ben
                    Attached Files

                    Comment


                      Internet problems causing the discrepancies???

                      Hi Ben,

                      On Friday I ran the indicator on two separate machines with two separate internet connections, the images are the first two images attached. As you can see from around 12:00 to 13:30 the cumulative delta line on these charts is moving in oppopsite directions (the delta bars as well). Then at the end of the day I ran the market replay on the two machines which I have attached as the third chart. This turned out to be identical between the two machines.

                      I'm living in Buenos Aires, Argentina at the moment, so I figured the likely cause of the discrepancy is in the internet connection quality. After running some tests I verified that the ping times for the connections are definitely different and also that sometimes they have packet loss to US servers.

                      This would suggest then that the problem is caused by delays in the ticks arriving and ticks not arriving in the correct sequence. This would be correct if:
                      a. The bid / ask information and the ticks confirming volume transacted at price are sent separately.
                      b. When the indicator is calculated real time, the time stamps from the exchange sent with the ticks and the bid / ask are ignored. NT calculates the delta by comparing the tick price with the current bid / ask available at that time.

                      On the other hand, when the ticks and bid / ask are recorded in the database, they seem to be recorded with the timestamps sent from the exchange.

                      I have know idea if the assumptions above are correct, however if they are, then the only way to ensure that the delta's and cumulative delta are 100% correct would be to read the values from the NT database instead of recording them live. To make it accurate this would need to occur with say a 1 - 2 second delay to ensure that all ticks are in. Anyone who has a better internet connection than I do should have results which look a lot more like the market replay files.

                      What do you think?

                      Grtz,

                      TiP2012
                      Attached Files

                      Comment


                        Awesome job Tip2012!

                        It's going to take all of us some time to think about your info...thank you so much for the stellar effort!

                        Ben

                        Comment


                          Have any of you guys done a "screener" for lot sizes? For instance, on the US Ten Year Note market (and the ES) the Delta on large lot sizes can be more accurate. The delta > 99 contracts screens out a lot of small traders. I know a few delta traders that compare the large lot size deltas against the total etc. Supposedly it gives a better edge?

                          Comment


                            I've heard of that as well and wouldn't mind seeing that as an option.

                            Comment


                              Delta testing

                              Hi Ben,

                              Glad to see the updated version.

                              I loaded the new updated version on 1 min ES chart as a bar plot (with cumulative turned off), during late evening overnight hours when ES is slow. I also loaded a ES Time and Sales window,to calculate delta manually. I found that it is not calculating delta of the bars correctly.
                              It starts off calculating delta of the bar correctly,but when a transaction happens which is "above ask" or "below bid", it seems to interpret it wrong and plotting delta of the bar incorrectly.

                              Is it possible, you are not handling, and missing the "above ask" or "below bid" transactions somehow. And due to this, delta of the bar which say has to be like very high is ending up very small. For example, 7:19 pm EST, there was a huge block transaction "above ask" in Time and Sales showing delta of the bar as 200+, but the indicator plotted it as close to zero (around +5). It appears as if it is missing thos transactions.

                              Just a guess, if the below part of the code in the "BidAskVolume" else section is somehow missing to catch the "above ask" or "below bid" transactions.


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

                              if (e.Price >= e.MarketData.Ask.Price) { buys += e.Volume; Total += e.Volume; }
                              else if (e.Price <= e.MarketData.Bid.Price) { sells += e.Volume; Total -= e.Volume; }


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

                              May be Ray or someone from Ninja support can help us out here to comment if the above 2 lines of code is missing out the "above ask" or "below bid" transactions.

                              Commodity Trader

                              Comment


                                I would check the e.MarketDataType with MarketDataType.Ask or .Bid first. Then aggregate Volume based on the Price after I determine the Market Data Type.
                                Josh P.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                666 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                376 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                110 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                575 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                580 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X