Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Summation (SUM)

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

    #16
    scope of problem

    its interesting to see someone else is having the same issue i had. if this is a bug i think NT should address it.

    if this is an issue with the type of data series being used in SUM, then there should be some additional notations made to the help page on SUM.

    i can't imagine how many people are using SUM in a strategy and potentially getting results that are incorrect due to no fault of their own.

    Comment


      #17
      Okay. Let us ensure that we are actually all talking about the same issue here.

      I am thinking about a custom DataSeries where you set a value and then start changing the values, then the SUM will calculate differently. This is expected.

      jcash,

      Was your issue resolved?

      saltminer,

      If you could ensure you are on 6.5.1000.11 and provide me with your sample script that would be great.
      Josh P.NinjaTrader Customer Service

      Comment


        #18
        not really. as i posted before, i had to use the actual formula from the SUM indicator within my strategy to get correct results.

        sumnum.Set ( MyData[0] + (CurrentBar > 0 ? sumnum[1] : 0) - (CurrentBar >= 6 ? MyData[6] : 0) );

        so, yes i got the results i wanted but not using SUM.

        Comment


          #19
          Hmm. To revisit then, real-time or historical? CalculateOnBarClose = true or false? Issue on running SUM on custom DataSeries? On indicators? Or both?
          Josh P.NinjaTrader Customer Service

          Comment


            #20
            real-time

            false

            custom DataSeries

            Comment


              #21
              saltminer,

              Same for you?
              Josh P.NinjaTrader Customer Service

              Comment


                #22
                Using NT 6.5.1000.11
                Custom DataSeries
                CalculateOnClose = true

                I have written a strategy for you that illustrates the bug clearly. (attached)

                saltminer
                Attached Files

                Comment


                  #23
                  Thank you. Will look into.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #24
                    Thank you for bringing this up. It has been resolved in NT7.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #25
                      I'm not sure that is good news. The release (non beta) version of NT7 is due about Christmas, according to the recent announcement.
                      Are there no interim bug-fixes for 6.5 any more? We just have to cope?
                      saltminer

                      Comment


                        #26
                        The interim solution is to just hard code a SUM in your code yourself as jcash has done.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #27
                          Is SUM() the only indicator affected, or are there others in there with this problem that we should know about?
                          I'd prefer not to be guessing throughout the next 6 months of professional NinjaScript development time.
                          Thanks,
                          saltminer

                          Comment


                            #28
                            SUM() is the only one we are aware of.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #29
                              This problem also affects LinReg, because the LinReg indicator calls SUM.

                              There probably are other indicators affected too.

                              Comment


                                #30
                                Thank you saltminer. For sure any dependent indicator will be influenced too.
                                Josh P.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                600 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
                                558 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