Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Incorrect values from Order Flow Cumulative Delta indicator

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

    Incorrect values from Order Flow Cumulative Delta indicator

    Hello,

    During fast markets, I am seeing some values from the Order Flow Cumulative Delta that don't seem correct.

    The attached screen grabs show two green bars that occurred with the exact same timestamp of 08:12:41.757 according to the data box.

    The total volume reported by VOL was 15 in the first bar and 33 in the second.

    The Delta High/Low/Close from the Cumulative Delta indicator in both bars doesn't seem likely given the price action and volume reported by VOL. The Delta Close was -4 in the first bar and -4 in the second bar.

    The old Buy Sell Volume indicator reports the delta as +7 in the first and +33 in the second. Which seems more likely than not to be correct given the quick price movement up. Using the old Buy Sell shows a +40 delta on total volume of 48 for these two bars.

    I am calculating delta in the BuySellVolume indicator by using: Delta = Buys - Sells - Sells

    I don't know if this happens live, I noticed it after the fact when I reloaded my chart. I presume it does if it's happening when I have tick replay enabled and calculate set to OnEachTick.

    So two questions:
    1) Is the Order Flow Cumulative Delta indicator incorrect?
    2) Is calculating delta this way using the Buy Sell Volume valid?

    Chart:
    NQ 3 Range Chart
    Date: 3/29
    OrderFlow Cumulative Delta(BidAsk,Bar,0)

    UPDATE: I attached a third screen grab that shows a third red bar that occurred only 4 milliseconds after the first. It shows some other discrepancies. In this bar, total volume was reported by VOL to be 4 but the Delta Close was +41. I guess this is where the missing trades from the second bar went to.

    If you assume the data reported from the cumulative delta indicator on the second bar is an incorrect copy of the first bar, you get + 38 across all three bars ( -4 + 42 ) which matches what the Buy Sell indicator shows across all three bars:
    15-4-4 = 7
    33-0-0 = 33
    4-3-3 = -2
    Total: 7 + 33 - 2 = 38
    Attached Files
    Last edited by NickyD; 03-31-2018, 12:40 PM.

    #2
    Hello NickyD,

    There have been changes to the Cumulative Delta indicator.

    May I confirm you are using NinjaTrader 8.0.13.1?

    Below is a public link to the release notes.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I was using 8.0.12.1

      I downloaded 8.0.13.1 tonight and reloaded the chart and the results though slightly different are still looking questionable.

      Those same three bars show the same values from VOL and Buy/Sell Volume but the cumulative delta now shows:


      ................Open.......High.....Low......Close
      1st bar - ....0...........0........-4.........-4
      2nd bar - ....0...........0.........0.........0
      3rd bar - ....0..........45........0.........45
      Note on the third bar, VOL still reports total volume of 4.
      Last edited by NickyD; 04-01-2018, 10:38 PM.

      Comment


        #4
        Hello NickyD,

        I'm not quite certain that I am understanding.

        May I have a screenshot of the chart?

        What are you expecting the volume to show?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I am expecting two things:

          1) That it should be impossible for the Delta Close of a single bar to be larger than the total volume of that bar. However as the attached images show: Total Volume = 4 but Delta Close = +45.

          2) On a closed bar, I am expecting the values returned by the Buy/Sell Volume indicator to exactly match the Cumulative Delta indicator when it's settings are DeltaType = Bid/Ask and Period = Bar. When using the Buy/Sell Volume indicator, the order delta can be calculated as: Buys - Sells - Sells
          Attached Files

          Comment


            #6
            Hello NickyD,

            Thank you for your screenshot and your reply.

            I'm inquiring with our development about this.

            I appreciate your patience.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hello NickyD,

              I've received some information back from our development.

              When multiple ticks/bars have the same timestamp, NinjaTrader doesn't know the order of them in relation to the other series.
              As a result, it fires off all the items in a row before changing back to the other series
              Therefore sometimes we lose track of 'what tick goes in what bar'.
              If you are wondering why this works for Volumetric bar type is because this bar type is literally 'building the bars from the ticks' where as cumulative delta is 'reconstructing the bars from the ticks'.

              Below is a link to the help guide that has a graphic to explain this under the heading 'Shared Timestamps'.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Hi Chelsea, thanks for following up.

                I guess I don't undserstand the interplay between the Cumulative Delta indicator and my primary data series. I don't knowingly have multiple data series on the chart, there is just one primary data series (NQ 3 Range). Does the indicator add another one behind the scenes?

                Also, the Cumulative Delta doesn't show this discrepancy using market replay, is that what you'd expect given your info?

                Comment


                  #9
                  Hello NickyD,

                  The Order Flow Cumulative Delta runs with real-time data. For this to load historically it is necessary to enable TickReplay which adds a 1 tick series to the script for intra-bar granularity.

                  This is subject to shared timestamps.

                  Market Replay data is real-time data, so this would build in real-time and not historically and would not be subject to shared timestamps.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    So does this imply that the shared timestamps scenario doesn't apply to live market data? I shouldn't see this occur during the day live?

                    Comment


                      #11
                      Hello NickyD,

                      Yes, this is my understanding the issue occurs when loading historical data as NinjaTrader attempts to construct the bars from historical data.

                      In real-time ticks are received in the order they are sent from the data provider and are not affected by this behavior.
                      Chelsea B.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by ghoul, Today, 06:02 PM
                      3 responses
                      14 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by jeronymite, 04-12-2024, 04:26 PM
                      3 responses
                      44 views
                      0 likes
                      Last Post jeronymite  
                      Started by Barry Milan, Yesterday, 10:35 PM
                      7 responses
                      20 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by AttiM, 02-14-2024, 05:20 PM
                      10 responses
                      180 views
                      0 likes
                      Last Post jeronymite  
                      Started by DanielSanMartin, Yesterday, 02:37 PM
                      2 responses
                      13 views
                      0 likes
                      Last Post DanielSanMartin  
                      Working...
                      X