Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sum of Series

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

    Sum of Series

    How can we get a sum of a series of values. Like Close + Volume?



    #2
    Hello r3n3v,

    Thank you for your inquiry.

    To clarify, are you simply wanting to add the close price of a bar to the volume of that bar, are you wanting to sum up all values in the close series and all the values in the volume series and then add those togther, or something else entirely? If you can clarify the use case that'd be helpful.

    If you're just wanting to add the values together you could do something like this on each bar update, for example:

    double AddedValues = Close[0] + Volume[0];

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Sum all values in both series...not this......

      Comment


        #4
        Hello r3n3v,

        Thank you for your reply.

        In that case you can simply use SUM():



        For example: SUM(Close, CurrentBar)[0] would give you the sum of all the values of the close prices for each bar on the chart up to and including the most recent bar.

        Please let us know if we may be of further assistance to you.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        81 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        42 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        66 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        54 views
        0 likes
        Last Post CarlTrading  
        Working...
        X