Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Secondary Day Series Not Updated With Settlement

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

    Secondary Day Series Not Updated With Settlement

    If an indicator adds a secondary day series like
    Code:
    AddDataSeries(Data.BarsPeriodType.Day, 1);
    The day series is updated at the end of the session as expected. However, later when the settlement price comes thru (i.e. futures), the day series does NOT get updated with the new settlement price. If you monitor the market data events, the settlement price does come thru. If you reload the NinjaScript, the day series will come thru with the updated settlement.

    So, it seems there is a missing update of the secondary series when the settlement price comes thru.

    #2
    Hello aslane, and thank you for your report.

    I am currently attempting to reproduce this in a controlled way, and will update this thread should I require any additional information or have information to report.

    Thank you for using NT8
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      After extensive testing, we have determined that the latest version of NinjaTrader does not exhibit this behavior. If you continue observing this behavior into the next release, or if there are any other questions we may answer, please let us know so we may investigate further.
      Jessica P.NinjaTrader Customer Service

      Comment


        #4
        Are you saying this is fixed in 8.0.2 (which is not out yet)? If so, when is this projected to be released. Thanks.

        Comment


          #5
          Yes, this should be fixed in 8.1.0.2 . If it is not fixed, we would appreciate your report and the ability to continue working with you to determine the difference between our systems and yours. Thank you once more for your report and for helping to improve NinjaTrader 8.

          While we do not have a release date, please keep an eye on the NinjaTrader 8 Release Notes page for updates and bugfixes.

          Jessica P.NinjaTrader Customer Service

          Comment


            #6
            This is NOT fixed. Not sure what you tested, but I suspect you did not really understand the issue as explained. Attached is a simple study that you can apply and run during LIVE data thru the close of a future (i.e. ES 12-16).

            When you run this with live data (ES), you will see the following sequence in the output window:

            * OnMarketData settlement will come thru at approx 3:21 pm, this contains correct settlement price

            * after market re-opens, the daily bar for the current day will come thru with the RTH close value (settlement has not been updated)

            * if you then reload NinjaScript with F5, you will see the daily bar played back with the correct settlement price.

            Currently, it is required to use OnMarketData to get the correct settlement prices for the current day. Instead, it should be possible to get the correct settlement with daily bar updates. Either the daily bar should come thru twice, once with the RTH close and then again later with the updated settlement OR just once after the settlement comes thru (either is fine, and could depend on instrument and timing of when exchange sends settlement thru).

            Note: you have to be careful when debugging, as sometimes the settlement price is the same as the RTH close, so you may not detect an issue.
            Attached Files

            Comment


              #7
              Thank you for following up with us aslane, and for providing steps and a test script. I will be running the test you recommended on NinjaTrader 7 and 8 (to see if this is a regression) and am researching the specified behavior of Ninja as far as when data is supposed to refresh. I will return to the thread should I need more information or when I have information to report.

              I did have one question that may help us narrow down what is occurring, could I ask which data feed provider you are using?
              Last edited by NinjaTrader_JessicaP; 12-09-2016, 10:39 AM.
              Jessica P.NinjaTrader Customer Service

              Comment


                #8
                I am using Continuum

                Does not really matter if NT7 works or not, NT8 is what needs to work moving forward. The issue as stated, is that NT8 does not pass thru correct (or updated) daily bars when collecting live data. This results in different data when observing live vs historical data. Requiring tracking market data just to see the settlement price for a secondary series is not the answer (but does work).

                Comment


                  #9
                  I was unable to reproduce this in a full Kinetick feed in either NT7 or NT8. Would it be possible to let us know which data feed you are using?
                  Jessica P.NinjaTrader Customer Service

                  Comment


                    #10
                    Per the previous post, I am still using Continuum.

                    Comment


                      #11
                      Hello aslane,

                      Over the last few days I was unable to reproduce this using the ES 12-16 instrument, forcing it into RTH instead of its default ETH setting. Refreshing has continued to have no effect on any bars surrounding the end of the day. This morning was not a valid test, as the settlement and opening price were the same, but to confirm my test method, yesterday's settlement price was 2256.50, and today's OHLC for the first 1 minute bar was 2256.50, 2258.00, 2256.00, and 2256.50 . I used a NinjaTrader Continuum demo, and kept my connection on overnight.

                      Would it be possible, the next time this occurs for you, to record a settlement price after trading ends, and your OHLC values for your first bar when trading begins again, both before and after refreshing?
                      Jessica P.NinjaTrader Customer Service

                      Comment


                        #12
                        Yes, I will monitor and post the tracking output to show the sequence. Will post back when I have info.

                        Also, you should not be using ES 12-16 anymore, as it rolled to ES 03-17.

                        Comment


                          #13
                          I re-ran this today and am providing more info. I opened a simple 15-min chart of the ES 03-17 using ETH session (everything vanilla) using the Continuum feed for data. I added the indicator that I am attaching to this post, and ran during the day thru the close and into the post-RTH session. The following is the output:

                          Code:
                          State = SetDefaults
                          State = SetDefaults
                          State = Terminated
                          State = SetDefaults
                          State = Configure
                          State = Terminated
                          State = DataLoaded
                          State = Historical
                          Daily Bar update at 12/12/2016 4:00:00 PM Daily Bar SettlementPrice = 2250.50 OHLCV = 2255.25, 2264.75, 2246.75, 2250.50, 1287827
                          Daily Bar update at 12/13/2016 4:00:00 PM Daily Bar SettlementPrice = 2267.75 OHLCV = 2250.25, 2273.00, 2247.75, 2267.75, 1556179
                          Daily Bar update at 12/14/2016 4:00:00 PM Daily Bar SettlementPrice = 2252.00 OHLCV = 2268.00, 2272.50, 2243.00, 2252.00, 1794750
                          State = Transition
                          State = Realtime
                          OnMarketData settlement at 12/15/2016 3:24:47 PM SettlementPrice = 2258.50 BarsInProgress = 0
                          OnMarketData settlement at 12/15/2016 3:24:47 PM SettlementPrice = 2258.50 BarsInProgress = 1
                          Daily Bar update at 12/15/2016 4:00:00 PM Daily Bar SettlementPrice = 2259.75 OHLCV = 2251.75, 2267.75, 2247.25, 2259.75, 1703804
                          
                          ** Reload NinjaScript with F5 ***
                          
                          State = SetDefaults
                          State = Terminated
                          State = Configure
                          State = DataLoaded
                          State = Historical
                          Daily Bar update at 12/12/2016 4:00:00 PM Daily Bar SettlementPrice = 2250.50 OHLCV = 2255.25, 2264.75, 2246.75, 2250.50, 1287827
                          Daily Bar update at 12/13/2016 4:00:00 PM Daily Bar SettlementPrice = 2267.75 OHLCV = 2250.25, 2273.00, 2247.75, 2267.75, 1556179
                          Daily Bar update at 12/14/2016 4:00:00 PM Daily Bar SettlementPrice = 2252.00 OHLCV = 2268.00, 2272.50, 2243.00, 2252.00, 1794750
                          Daily Bar update at 12/16/2016 4:00:00 PM Daily Bar SettlementPrice = 2258.75 OHLCV = 2259.50, 2261.25, 2257.75, 2258.75, 16009
                          Daily Bar update at 12/15/2016 4:00:00 PM Daily Bar SettlementPrice = 2258.50 OHLCV = 2251.75, 2267.75, 2247.25, 2258.50, 1703803
                          State = Transition
                          State = Realtime
                          OnMarketData settlement at 12/15/2016 3:24:47 PM SettlementPrice = 2258.50 BarsInProgress = 0
                          OnMarketData settlement at 12/15/2016 3:24:47 PM SettlementPrice = 2258.50 BarsInProgress = 1
                          The first part of the output shows
                          * the historical daily bars being loaded
                          * then going to real-time data
                          * then the settlement price comes in via OnMarketData, this happens before ETH ends
                          * ETH then ends
                          * when first bar after 4PM starts, the daily bar comes thru, and the close does not contain the settlement price, the close contains the last price from ETH session

                          At this point, I reloaded the ninjascript to reload all data. The second part of the output shows the historical day bars coming thru, and this time the last days bar comes thru correctly with the settlement price set as the close. Also note, that the volume has changed.
                          Attached Files

                          Comment


                            #14
                            Thank you aslane. I believe there was a misunderstanding on my part. This is an expected behavior. When you reload data, you are pulling from the historical data server, rather than your live data feed. While this information typically matches, different data feed providers will provide slightly different information. This is due, for instance, to starting and stopping at different millisecond times between data providers. Trades come in frequently, and very small changes can result in different prices.

                            I am including relevant links to the help guide for more information.



                            Jessica P.NinjaTrader Customer Service

                            Comment


                              #15
                              You are kidding right? I have exhaustively explained and debugged your issue, which is you are not providing the correct daily bar during live data. It is fine if that particular bar is sent thru initially, but once the settlement price is updated and the daily bar is updated, the new daily bar must be sent thru.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Rapine Heihei, Today, 08:19 PM
                              1 response
                              3 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by Rapine Heihei, Today, 08:25 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post Rapine Heihei  
                              Started by f.saeidi, Today, 08:01 PM
                              1 response
                              4 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by Rapine Heihei, Today, 07:51 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post Rapine Heihei  
                              Started by frslvr, 04-11-2024, 07:26 AM
                              5 responses
                              96 views
                              1 like
                              Last Post caryc123  
                              Working...
                              X