Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Closes[0][0] vs PriorDayOHLC().PriorClose[0] with muliple time frames

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

    #16
    Hello infin8loop,
    You are applying the indicator on the next months contract (ZC 12-12).

    If you set the merge policy to MergeBackAdjusted or MergeNonBackAdjusted then the historical data will be for the near month contract and the real time bar will be that of the next month contract.

    If you change the Merge Policy to DoNotMerge then can you confirm are you able to get the right data.
    • In Control Center menu bar goto Tools>Options>Data tab
    • Change the Merge Policy to DoNotMerge
    • Restart NinjaTrader
    JoydeepNinjaTrader Customer Service

    Comment


      #17
      Thanks. Yes, I am aware of this. My merge policy is set to DoNotMerge.

      Comment


        #18
        Hello infin8loop,
        If I use the below indicator to print out the OHLC values, with merge policy set to DooNotMerge then I can get the correct values.

        Can you confirm the results at your end.
        Attached Files
        JoydeepNinjaTrader Customer Service

        Comment


          #19
          Thanks for the test code. I should have mentioned that the only place I'm seeing this problem is for yesterday's close. I noticed that 8/27/2012 is missing from your results but it is in your Historical Data Manager. Here are my results - notice the last one for 8/27/2012:

          8/8/2012 12:00:00 PM Open= 799.75 High= 817.25 Low= 792.5 Close= 816.5
          8/9/2012 12:00:00 PM Open= 815.75 High= 829.75 Low= 815.75 Close= 823.75
          8/10/2012 12:00:00 PM Open= 823 High= 849 Low= 807.25 Close= 809.25
          8/13/2012 12:00:00 PM Open= 807.75 High= 813.75 Low= 786 Close= 792.25
          8/14/2012 12:00:00 PM Open= 794.25 High= 800 Low= 786.75 Close= 789
          8/15/2012 12:00:00 PM Open= 789.25 High= 806 Low= 787 Close= 804
          8/16/2012 12:00:00 PM Open= 803.5 High= 810.5 Low= 799.25 Close= 807.5
          8/17/2012 12:00:00 PM Open= 805.5 High= 813.25 Low= 803 Close= 807.25
          8/20/2012 12:00:00 PM Open= 807.25 High= 825 Low= 807.25 Close= 823.75
          8/21/2012 12:00:00 PM Open= 823 High= 840 Low= 821.5 Close= 838.75
          8/22/2012 12:00:00 PM Open= 837.5 High= 839.5 Low= 828.25 Close= 834.75
          8/23/2012 12:00:00 PM Open= 834 High= 838.75 Low= 812.25 Close= 814.75
          8/24/2012 12:00:00 PM Open= 814.75 High= 823 Low= 806 Close= 808.5
          8/27/2012 12:00:00 PM Open= 808.5 High= 810 Low= 800.25 Close= 800.25

          Comment


            #20
            Hello infin8loop,
            I was using COBC to true and thats why the 27th's data was missing.

            I can get the correct value for the 27th too with Kinetick as my connectivity provider.

            If you reload the historical data then can you get the correct values.

            To reload your historical data please right click in the background of your chart and select 'Reload All Historical Data'.
            Attached Files
            JoydeepNinjaTrader Customer Service

            Comment


              #21
              I'm also using COBC = true. I notice that using the ETH template, COBC doesn't make a difference - the daily bar closes without having/using the daily value from Kinetick. i.e. if another data series bar closes after the end of the session, it seems to trigger a daily bar close using a different close that is based off of the minute data if the daily data has not been downloaded.

              I have tried reloading all historical data from the chart and I'm seeing the same result (Close = 800.25). Any thoughts on why it would be different for me?

              Thanks.
              Last edited by infin8loop; 08-29-2012, 08:25 AM.

              Comment


                #22
                Hello infin8loop,
                If you open a daily chart, then can you please tell me, what is the closing price for the 27th August bars.
                JoydeepNinjaTrader Customer Service

                Comment


                  #23
                  I decided to disconnect from Kinetick and reconnect. After doing so, the indicator displays the correct value. (The daily chart also shows the correct value, but I looked at this after the reconnect so I can't be sure what it was prior to that). I've been experiencing this problem for a while. Until now, I wasn't sure it had anything to do with connecting/reconnecting.

                  Comment


                    #24
                    Hello infin8loop,
                    Glad you could get the correct values.

                    If you can replicate the scenario then please let me know I will be happy to investigate it further.
                    JoydeepNinjaTrader Customer Service

                    Comment


                      #25
                      Thanks for your help and timely responses!

                      I am able to replicate the problem. Basically, the daily data is not appearing in the Historical Data Manager each day unless I manually reload/download historical data. This is on a machine using Kinetick (I've witnessed this on three different instruments for the past three days). I see the correct settlement price in the OnMarketData method for the LastClose property however, the daily bars show a different value in real-time (COBC doesn't make a difference).


                      Perhpas you could help answer the following questions:
                      1. Is there a way to ensure daily historical data is automically downloaded each day?
                      2. Other than manually (i.e. through a chart, the Historical Data Manager or on the connection to a data provider) what triggers the loading of daily historical data from the data provider?
                      Last edited by infin8loop; 08-31-2012, 04:38 PM.

                      Comment


                        #26
                        Manual download/reconnect required to use settlement prices each day

                        The correct settlement price does not appear in the secondary daily data series (i.e. Closes[1][barsAgo]) until daily data is download manually using the Historical Data Manager (or the connection is re-established, I assume). Until this is done, the close of the last minute bar for the session is returned for the close of the daily data series.

                        I also noticed that, before I downloaded historical data through the Historical Data Manager, the correct dates and settlement prices were in the Historical Data Manager already. However, it wouldn't use them on the chart until after I performed a download - refreshing the indicator, reloading historical data from the chart or creating a brand new chart instance did not help.

                        Could you please verify that a manual step, either downloading daily data using the Historical Data Manager or reconnecting to the data provider, is required in order to accurately use daily settlement values. I think this is critical information for people who rely on daily settlement prices for their trading.
                        Last edited by infin8loop; 09-04-2012, 02:03 PM.

                        Comment


                          #27
                          Hello infin8loop,
                          My historical database has eod data till 30th (see attached screenshot Pic.png).

                          I applied an indicator with a secondary bar series (Add(PeriodType.Day, 1) added. The indicator filled the missing dates as shown in Pic1.png, and it matches with bars on the chart.
                          Attached Files
                          JoydeepNinjaTrader Customer Service

                          Comment


                            #28
                            Problem occurs on real-time data without reloading/reconnection on a different symbol

                            Thanks for the reply. But the problem I'm having is while running with real-time data without reloading or reconnecting. Also, I should mention I'm experiencing this primarily on ZC 12-12. I notice that the minute vs. daily data closes on the ES match more often than not whereas they often does not on ZC. I've noticed that the indicator will not use the daily data even though it is in the historical data manager sometimes but continues to use minute values. So, it's important for this test that the last minute bar's close for the session be different than the daily bar's close.

                            Would you mind trying your test again under those conditions (i.e. use ZC 12-12 and watch it after the close and/or before the open then next day without reconnecting or downloading historical data, ensure minute value does not match daily close and compare the daily close with the CME's value)?
                            Last edited by infin8loop; 09-05-2012, 09:26 AM.

                            Comment


                              #29
                              Hello infin8loop,
                              If you change the merge policy to DoNotMerge then are you able to get the correct values.
                              • In Control Center menu bar goto Tools>Options>Data tab
                              • In the Data tab please change the Merge Policy to DoNotMerge.


                              Please restart NinjaTrader and see if you could get the correct values.
                              JoydeepNinjaTrader Customer Service

                              Comment


                                #30
                                The behavior I'm describing is using DoNotMerge.

                                My theory is that , in real-time, it is using minute data to calculate the close for the secondary series daily bar, regardless of the presence of a daily bar in the historical data manager. The only time you notice this is when the minute close value differs from the daily close value (i.e. the settlement price) from the data vendor (Kinetick in my case).
                                Last edited by infin8loop; 09-05-2012, 11:26 AM.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                670 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                379 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                111 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
                                582 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X