Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Possible bug [B7]: Discrepancy between daily bar closes

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

    Possible bug [B7]: Discrepancy between daily bar closes

    The discrepancy is between the closing prices of daily bars as computed using the PriorDayOLHC indicator (on intraday bars) and the value reported in the DataBox widget for daily bars.

    Specific example:

    Market data feed provider: Kinetick
    Instrument = ES 12-15
    Prior day's date = 2015-12-09
    Current date = 2015-12-10

    Closing price of daily bar (for 2015-12-09) according to the CME: 2042.00 [Link: http://www.cmegroup.com/trading/equi...-sandp500.html ]

    Closing price of daily bar (for 2015-12-09) according to the DataBox: 2042.00 [Note agreement with CME]

    Prior day closing price according to the PriorDayOHLC indicator (on 3 min bars for a chart showing prices on 2015-12-10): 2045.25

    Prior day closing price according to Closes[1][1], when accessing the closing prince of the prior day's bar from an indicator which has added daily bars as its second input data series: 2045.25. This value really, really should match the value reported by the Data Box.

    I suspect that this is why the pivot prices computed by the Pivots indicator using "CalcUsingDailyBars" mode are incorrect.
    Last edited by strategesis; 12-10-2015, 02:16 PM.

    #2
    Daily data from Kinetick is Settlement Adjusted (as is the data you referenced from the CME).

    The minute and tick data provider is NOT adjusted and will show you the true last traded price as the closing, in this case 2045.25.

    The PriorDayOHLC is using minute data, so it will be the non settlement price for the close.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Mathew,

      What about daily bars added as a secondary input data series? Shouldn't those closing values also be settlement adjusted? If they're not, you won't compute the same values of most indicators which are applied to a daily chart versus those which are applied to secondary input series which are daily bars.

      And they definitely are not.

      Also, I just checked the implementation of the Pivots indicator. It gets daily bar closes by adding a second input series of daily bars. That's why the pivot prices it computes are wrong.

      Comment


        #4
        Daily data added through AddDataSeries() would also be settlement adjusted. The adjustment comes from Kinetick servers so it doesn't matter if you added it through a script or through a chart manually. The daily close will always have the settlement price.

        I just ran a quick test by adding a Daily data series to 1440 minute bar chart and comparing the close price. Here is a small sample. Note that there are days where the settlement and last trade price are equal, which can be expected.

        Code:
        12/3/2015
        ES 12-15 (1440 Minute) 2053.5
        ES 12-15 (Daily) 2051.25
        12/4/2015
        ES 12-15 (1440 Minute) 2088.5
        ES 12-15 (Daily) 2088.5
        12/7/2015
        ES 12-15 (1440 Minute) 2081
        ES 12-15 (Daily) 2081
        12/8/2015
        ES 12-15 (1440 Minute) 2060
        ES 12-15 (Daily) 2058.75
        12/9/2015
        ES 12-15 (1440 Minute) 2045.25
        ES 12-15 (Daily) 2042
        Can you please provide some more details on how you were able to come to the conclusion that daily bars added through a script did not reference the settlement price? I double checked the Daily values added through the script versus the CME group charts and they matched the data that was printed out as well.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Mathew,

          Using the Pivots indicator in "Calculated from intraday data" mode, today's ES 12-15 pivot is computed to be 2053.08 (which is the same as the value computed by "the same" indicator on NT7.)

          Using the Pivots indicator in "Use user-defined values" mode, with the prior-day high set to 2079.75, with the prior day low set to 2034.25, and the prior day's close set to 2045.25 (the actual intraday session final trade price), the ES 12-15 pivot is computed to be 2053.08 (the same value as computed by "the same" indicator on NT7, using the same mode and values.)

          Using the Pivots indicator in "Use user-defined values" mode, with the prior-day high set to 2079.75, with the prior day low set to 2034.25, and the prior day's close set to 2042.00 (the prior day's settlement price), the ES 12-15 pivot is computed to be 2052.00 (the same value as computed by "the same" indicator on NT7, using the same mode and values.)

          Using the Pivots indicator in "Calculated from intraday data" mode, the pivot is computed to be 2053.08.

          Using the Pivots indicator in "Use daiily bars" mode, the pivot is computed to be 2052.58. That's wrong, I was assuming that the problem was an incorrect value for the prior day's close. But if you are correct that the closing price is the settlement price when using a secondary input series of daily bars, then it can only be that a) one or both of the high or low prices of the prior day's bar are not correct, or b) that there is some other error in the Pivots indicator.
          Last edited by strategesis; 12-10-2015, 03:05 PM.

          Comment


            #6
            I see thanks for the details. There is a bug in the pivots indicator we're chasing in NTEIGHT-9008. I will add your observations with the PP being incorrectly calculated on the Daily mode. The problem after a brief debug session look sot be an incorrectly cached High value, resulting in the calculation you reported.
            MatthewNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Ithinkimlost, Yesterday, 08:50 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Started by Stanfillirenfro, Today, 05:31 AM
            0 responses
            16 views
            0 likes
            Last Post Stanfillirenfro  
            Started by sidlercom80, Today, 04:45 AM
            0 responses
            3 views
            0 likes
            Last Post sidlercom80  
            Started by NT-Roland, Today, 04:44 AM
            0 responses
            4 views
            0 likes
            Last Post NT-Roland  
            Started by knarfoe, Today, 04:26 AM
            0 responses
            2 views
            0 likes
            Last Post knarfoe
            by knarfoe
             
            Working...
            X