Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars.GetDayBar( 1 ) always returns null using Playback

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

    Bars.GetDayBar( 1 ) always returns null using Playback

    Hello ID,

    I've built an indicator to plot various values and I'm using Bars.GetDayBar( 1 ) to get the High and Low of the previous day.

    It works great except when I run it with the Playback connection. I've tried using different settings in the GoTo and even let it run for a few days of time to see if it just needed to have at least a day pass on the chart. Nothing has worked.

    Any ideas?
    daqu40
    NinjaTrader Ecosystem Vendor - QTradez

    #2
    Hello, thanks for writing in.

    There must be enough intraday historical data on the chart to calculate the daily bar. The best way to do this would be to connect to a data feed and download the historical data through the Tools>Historical Data downloading tool. After you load the chart with sufficient historical data the day bar will be able to calculate.

    Please let me know if I can assist any further.

    Comment


      #3
      Thanks for the reply Chris.

      There is plenty of historical data as evidenced by this screenshot:
      Click image for larger version

Name:	Screenshot 2021-03-23 160630.png
Views:	254
Size:	324.5 KB
ID:	1148184

      Now the same configuration, but using my delayed data feed.
      Click image for larger version

Name:	Screenshot 2021-03-23 161803.png
Views:	219
Size:	156.0 KB
ID:	1148185

      The new red and green lines come from Bars.GetDayBar(1) not returning null.

      I've also let it run in Playback for multiple trading days in a row and it is never able to get anything but null on a call to Bars.GetDayBar( 1 ).
      daqu40
      NinjaTrader Ecosystem Vendor - QTradez

      Comment


        #4
        Hello, thanks for your reply.

        I'm able to get daily data from the function with my simple test script. I attached it to this post, what do you get in the output window when running this on your chart?

        I look forward to hearing from you.
        Attached Files

        Comment


          #5
          Thanks for the example Chris.

          It doesn't work on my system.

          I do see that I'm a release behind, so I'm updating and seeing if that fixes it.

          That didn't get it working. I've also tried looking back infinite bars.

          Next I'm going to delete the Playback and historical data and reload it.
          Last edited by daqu40; 03-24-2021, 09:52 AM.
          daqu40
          NinjaTrader Ecosystem Vendor - QTradez

          Comment


            #6
            Hello, thanks for your reply.

            If your other tests are not working I recommend making a clean environment to test in:

            To create a clean installation please follow the instructions below:
            1. Go to Documents\NinjaTrader 8 and copy your Config.txt file to the desktop, you will replace the new "Config.txt" that gets generated with this saved copy so you don't have to enter your connection info and license key again.
            2. Exit the platform
            3. Go to (My) Documents > rename the 'NinjaTrader 8' folder to 'NinjaTrader 8.Prev'.
            4. Then re-install by running the installer from the following link: https://ninjatrader.com/GetStarted
            5. When you reinstall it will recreate the user folder you had just renamed with only stock files.

            Now you can start the platform and import the example. Test with new data.

            To switch between the two installs; shut down NinjaTrader > rename the new installation to 'NinjaTrader 8.Dev' under (My) Documents > then rename the 'NinjaTrader 8.Prev' to 'NinjaTrader 8'. NinjaTrader looks for the user folder named NinjaTrader 8 specifically.

            Comment


              #7
              Still not working. I'm on to complete reinstall of Ninja 8.
              daqu40
              NinjaTrader Ecosystem Vendor - QTradez

              Comment


                #8
                Complete reinstall and it's still not working on the Playback connection, but works fine on any other connection.
                daqu40
                NinjaTrader Ecosystem Vendor - QTradez

                Comment


                  #9
                  New behavior I'm seeing is that once the Playback connection is used, the simulated connection will also fail. Then connecting with an external connection restores function until Playback is used again.

                  I'm thinking we need to get one of your team on my system to see what's happening.
                  daqu40
                  NinjaTrader Ecosystem Vendor - QTradez

                  Comment


                    #10
                    Hello, thanks for your reply.

                    I can log into your PC through TeamViewer to take a look firsthand. Go to Control Center>Help>Remote Support to launch TeamViewer. Please send an email to "scriptingsupport at ninjatrader.com" and reference "Attn ChrisL 3026115" in the body of the email along with your TeamViewer ID and Password.

                    I look forward to hearing from you.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    607 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    353 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    105 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    560 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    561 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X