Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddDataSeries

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

    AddDataSeries

    comparing daily MNQ chart values with AddDataSeries values and they're not the same.

    Is this a known issue or is their perhaps a sample script showing it working ok?


    #2
    Hello fingers,

    Thank you for your post.

    I have tested this out on my platform and was not able to find a discrepancy.

    I'm attaching the test script so you can test it on your own, the script adds a 1 day MNQ data series and prints out the values of the primary data series and the added MNQ series. I applied this to a 1 day MNQ chart and found the values were the same.

    Please let me know if you see a discrepancy between the values using this script.
    Attached Files

    Comment


      #3
      ok thanks, applied to a 5 minute chart but I get this message?

      Click image for larger version  Name:	data.png Views:	0 Size:	7.0 KB ID:	1280017

      Comment


        #4
        just downloaded 8.1.2.1 but still the same?

        Comment


          #5
          Hello fingers,

          My apologies, I neglected to add a CurrentBars check to the test script. Please see the attached updated script.

          CurrentBars - https://ninjatrader.com/support/help...urrentbars.htm
          Attached Files

          Comment


            #6
            could this be a time zone setting issue but this is what I get

            Click image for larger version

Name:	data2.png
Views:	123
Size:	11.3 KB
ID:	1280155

            Comment


              #7
              Hello,

              Are you applying the script to a 5 minute chart? It's not expected that 5 minute bars would match daily bars.

              Closes[0][0] is using the primary data series (BarsInProgress index = 0), which is a 5 minute MNQ chart, not the last few days values of a Daily MNQ chart. Closes[1][0] is the added 1 day MNQ data series (BarsInProgress index = 1).

              I have attached a new test script that prints out the BarsInProgress value of Closes[0][0] and Closes[1][0] as well as the timestamp, so you are able to see more clearly what each value being printed represents.

              Closes - https://ninjatrader.com/support/help...nt8/closes.htm

              AddDataSeries() - https://ninjatrader.com/support/help...dataseries.htm

              BarsInProgress - https://ninjatrader.com/support/help...inprogress.htm

              Please let me know if you have any other questions.
              Attached Files

              Comment


                #8
                would you expect a secondary daily data series on a 5 minute chart to match a primary daily chart?

                to clarify ...

                1. on my 5 minute chart I have a secondary daily data series and I print "Print("Closes[1][0]:" + Closes[1][0])"

                2. on my daily chart I have no additional data series and print "Print("Closes[0][0]:" + Closes[0][0])"

                that's what the previous image shows.

                I just need to know if I'm doing something wrong or if they are actually different?

                Comment


                  #9
                  ok I understand now, penny dropped

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  601 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  347 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  103 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  559 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  558 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X