Finds the sum of the series. This function will not sum or total a sequence of comma limited values or expressions. For a non-array values totaling function see SumValues.
This example shows the use of the common auto indexed series. For information on using functions with non auto indexed series review Series Functions.
Syntax: |
---|
Sum( series, bars, [offset] ) |
Parameter: |
Description: |
---|---|
series |
name of the series |
bars |
number of bars over which to find the value |
offset |
number of bars to offset before finding the value |
Example: |
---|
' -------------------------------------- ' Find the sum of the 10 closes starting 20 bars ago
' -------------------------------------- ' for values shown. |
Returns: |
---|
Function returns the Sum or Total of the series elements specified. 1 = 1.000000000 SumX = 1 2 = 2.000000000 SumX = 3 3 = 3.000000000 SumX = 6 4 = 4.000000000 SumX = 10 5 = 5.000000000 SumX = 15 6 = 6.000000000 SumX = 21 7 = 7.000000000 SumX = 28 8 = 8.000000000 SumX = 36 9 = 9.000000000 SumX = 45 10 = 10.000000000 SumX = 55 Total Value of Series = 55 Total Value of Series = 19 |
Links: |
---|
|
See Also: |
Edit Time: 9/18/2020 11:39:28 AM |
Topic ID#: 592 |