Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

sum indicator

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

    sum indicator

    Hi,

    Anyone know how make the indicator Sum volume instead of price?


    Value[0] = Input[0] + (CurrentBar > 0 ? Value[1] : 0) - (CurrentBar >= Period ? Input[Period] : 0)

    What can i replace to get volume?

    TY

    #2
    Hello frankduc,

    Because the SUM indicator used Input in its syntax you can just pass the volume series into the SUM as an input:

    Code:
    double summed = SUM(Volume, 12)[0];


    I look forward to being of further assistance.

    Comment


      #3
      Sorry i dont get it at all.

      Where do i input that code?

      Above this
      Value[0] = Input[0] + (CurrentBar > 0 ? Value[1] : 0) - (CurrentBar >= Period ? Input[Period] : 0)

      Comment


        #4
        Hello frankduc,

        The syntax that I had provided you would put in your script, wherever you want the SUM value for the Volume Series.

        If you just wanted to calculate the SUM for Volume, you just have to pass it the series and would not need to edit the SUM indicator at all.

        If you want to make a SUM indicator that always uses volume, you can make a copy of SUM and then replace the Input syntax with Volume everywhere you find it.

        I look forward to being of further assistance.

        Comment


          #5
          I did what you said and it compile but i cant find the new indicator in the list when i double click indicator on the chart.

          Comment


            #6
            Hello frankduc,

            It should be listed as whatever you named the indicator when you created it.

            What steps did you follow to create the new indicator?

            You can find the Name = "" line in the file as well, and edit that to the name you want the indicator to have.

            I look forward to being of further assistance.

            Comment


              #7
              I give up

              Thanks for the help

              programming suck

              Comment


                #8
                Originally posted by frankduc View Post
                I give up

                Thanks for the help

                programming suck
                Frank,

                Don't give up. Attached is the VolumeSum indicator as you want.
                Easier than you think. All I did, changed "Input" to "Volume" and here you have it.

                Cheers!
                Attached Files

                Comment


                  #9
                  Thanks Aligator that is very nice of you. I dont have patience with programming.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  672 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  379 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  111 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  575 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  582 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X