Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8B6 GetDayBar is always null

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

    NT8B6 GetDayBar is always null

    As in subject GetDayBar is always null in my indicators
    I wrote a simple test indicator (here enclosed) and traced with visual studio.
    The if (GetDayBar(1) != null) is never true

    Someone else with the same problem?
    Attached Files

    #2
    Originally posted by aerofly View Post
    As in subject GetDayBar is always null in my indicators
    I wrote a simple test indicator (here enclosed) and traced with visual studio.
    The if (GetDayBar(1) != null) is never true

    Someone else with the same problem?
    On what time frame have you loaded the chart?
    How many days have been loaded on the chart?

    Comment


      #3
      Timeframe Minute. Tried 1 5 15 30 60
      days loaded at least 20
      database is full of 7 years of data (daily, minute, tick)

      Comment


        #4
        Hello,

        Thank you guys for reporting and working through this issue. I can see the same behavior on my end with the Beta 6 build, but your indicator is working as expected on the Beta 7 build which we are testing internally today. Since we have resolved an issue related to GetDayBar() in Beta 7, it appears that this particular issue has been resolved as well.

        Please keep this in mind to re-test on the Beta 7 build, which should be available to the public soon.
        Dave I.NinjaTrader Product Management

        Comment


          #5
          Ok. Thank You for your interest.
          I will try beta 7 as soon as available

          Comment


            #6
            Sorry but tried in beta 7 but on my side GetDayBar still return null always.

            Comment


              #7
              Update
              it works on daily timeframe but not on any intraday timeframe
              Attached there is an export of my test indicator
              Attached Files
              Last edited by aerofly; 12-03-2015, 01:14 PM.

              Comment


                #8
                Thank you for re-testing. Unfortunately I'm not seeing the same issue on my end with your new script. I'm seeing all expected Prints on Daily or intra-day timeframes. Do you find that this issue occurs with a certain instrument, or a certain chart template? Have you tested multiple intra-day intervals, or is it one particular interval that causes the issue? Are you running Tick Replay, using the Playback connection, or doing anything else which may make your scenario unique?
                Dave I.NinjaTrader Product Management

                Comment


                  #9
                  In my previous tests I've used different instruments and intraday timeframe but now after some new testing I have some clues though not definitive.

                  I live in Central Europe timezone (Rome).

                  Until now I've tried USA futures with "instrument default" TradingHours template.
                  Instead if I use EU instruments that have default TradingHours template based on my timezone I view some plots but in some way incorrect; i mean if i print/plot GetDayBar(1).High the value plotted isn't high of previous day (simple to check visually).
                  I'm unable to understand which value is plotted but at least i see something.

                  Same results with USA instruments (e.g. CL crude oil ) using TradingHours template based on my timezone.

                  If i use EU or USA instruments with TradingHours template based on EST or CST timezone then GetDayBar(1) is always null (even with "default 24x5" template).

                  I've wrote my own similar GetDayBar class as a workaround to use in my own indicators but when I have some spare time I will make further investigations.

                  Comment


                    #10
                    After further tests now I have reproducibile scenario.

                    To me GetDayBar(1) return values of the bar who has time 00:00 (1 day ago) but only if present on chart. To clarify GetDayBar(1).High return high of THAT specific bar and not high of previous day.

                    Depending on TradingHours template (and obviously timezone which is based on) AND timeframe period that specific bar is present or not on the chart.

                    For example using CL 01-16 template "default 24x5" and period 90M or 120M or 180M there is a bar with time 00:00 so GetDayBar give a result albeit incorrect.
                    Any period under 90M the bar is not present (actually is present but has time 23:00) and GetDayBar return always null
                    Using <use instrument settings> (which for CL is 09:00 - 14:30 EST (15:00 - 20:30 CET my timezone)) that specific bar never appears then GetDayBar return always null.

                    I can't evaluate if living in EU timezone make any difference but that are my findings

                    Comment


                      #11
                      Thank you very much for taking the time to drill down and identify the critical factors causing the issue. I will take another look at this on my end to see if I can reproduce using the scenario you described.

                      Edit: After re-testing, I can now see the issue you described. Note that GetDayBar() is designed to only function when the day requested is contained in your data series. GetDayBar() needs the prior data from the data series, restricted by the configured Trading Hours template, to create a virtual bar which is based on the actual information displayed on your chart, rather than a raw set of historical data.

                      I am seeing the same behavior you described when I switch to an interval that is not a factor of 60. As you said, any interval which does not include a bar with a 00:00 timestamp seems to result in GetDayBar() returning null. I am going to submit a report to our team to investigate further and see what can be done to resolve the issue.
                      Last edited by NinjaTrader_DaveI; 12-07-2015, 01:25 PM.
                      Dave I.NinjaTrader Product Management

                      Comment


                        #12
                        One quick note -- I've discovered a workaround that can be used in the meantime. It appears to me that this is happening (assuming you have enough days loaded in your data series) when Break at EOD is enabled, and when a bar is being broken at EOD. Disabling Break at EOD solved the issue for me, but I will still report this to our team to see if we can resolve it without the workaround.

                        I will post back with any further updates.
                        Dave I.NinjaTrader Product Management

                        Comment


                          #13
                          Dave thank You for your interest.

                          Please don't forget that when GetDayBar run still give un incorrect result i.e. not OHLC of the virtual day bar but OHCL of the 00:00 bar.

                          Comment


                            #14
                            Thank you. We have applied a fix which should address these issues in the next Beta release. Please keep these issues in mind to re-test when the Beta 8 build is released.
                            Dave I.NinjaTrader Product Management

                            Comment


                              #15
                              NT8B6 GetDayBar is always null RESOLVED

                              Just tested on beta8
                              All issues are gone.
                              Now GetDayBar works well.
                              Thanks for your excellent work.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by judysamnt7, 03-13-2023, 09:11 AM
                              4 responses
                              57 views
                              0 likes
                              Last Post DynamicTest  
                              Started by ScottWalsh, Today, 06:52 PM
                              4 responses
                              36 views
                              0 likes
                              Last Post ScottWalsh  
                              Started by olisav57, Today, 07:39 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post olisav57  
                              Started by trilliantrader, Today, 03:01 PM
                              2 responses
                              20 views
                              0 likes
                              Last Post helpwanted  
                              Started by cre8able, Today, 07:24 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post cre8able  
                              Working...
                              X