Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SUM indicator

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

    SUM indicator

    Anyone has an idea what is the formula of the SUM indicator.

    It says return sum for specified period.

    But if i ask 14 it says the sum of those 14 period = 15756 contracts on ESU9

    However the sum of the last 14 period calculated manually give more than 15756? I dont get it.

    Frank
    ty

    #2
    Hello,

    Thank you for your forum post.


    The Sum shows the summation of the last n data points.


    You should see this is the case try a more simpler 2 period SUM to see how this works. It works off the close price and a SUM of 2 yields the correct result for me.

    Comment


      #3
      What a piece of garbage i thought it was summing the volume.

      I wonder if i could change the code so it sums the volume?

      Frank
      ty

      Comment


        #4
        Hello,

        Yes this is possible and would require creating a second indcator based off this indicator and instead of using Close Price you would need to use Volume. If you were to use this indicator in NinjaTrader 7 you can do this in the platform with no custom coding needed as you can change the inputed data series to the Volume indicator output instead of the Close price on the chart.

        NinjaTrader 7 is in the later stages of beta testing and the public beta has been released and is available at the link below. There is no release date for NinjaTrader 7 yet. Please visit the below link for information on NinjaTrader 7 features and release information, select click here to download and input your license key. Then select download version 7 for all the information pertaining to the NinjaTrader 7 Open beta.


        You can contact one of our NinjaScript consultants to assist you with coding this if you need this on NinjaTrader 6.5 or you can use our NinjaScript guide and forums to code this indicator yourself if you are a programmer.

        NinjaScript Consultants:

        NinjaScript Help Guide:

        NinjaTrader Support Forum:

        Strategy Wizard:




        Let me know if I can be of further assistance.

        Comment


          #5
          code to switch to volume of SUM

          Hi,

          Anyone has tried to switch close price to volume like mention by Brett below "you can do this in the platform with no custom coding needed as you can change the inputed data series to the Volume indicator output instead of the Close price on the chart."

          I cant see where is the close price in the code:

          protected override void OnBarUpdate()
          {
          Value.Set(Input[0] + (CurrentBar > 0 ? Value[1] : 0) - (CurrentBar >= Period ? Input[Period] : 0));
          }

          Frank
          Ty

          Comment


            #6
            Forget about it iv done it and it works!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Graci117, Today, 09:02 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by ETFVoyageur, Today, 07:55 PM
            0 responses
            7 views
            0 likes
            Last Post ETFVoyageur  
            Started by janio973, Today, 07:24 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by aligator, 01-06-2022, 12:14 PM
            4 responses
            248 views
            0 likes
            Last Post john_44573  
            Started by reynoldsn, Today, 05:56 PM
            0 responses
            15 views
            0 likes
            Last Post reynoldsn  
            Working...
            X