> For the complete documentation index, see [llms.txt](https://indicators.agenatrader.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://indicators.agenatrader.com/standard-indicators/summation-sum.md).

# Summation (SUM)

#### Description <a href="#description_106" id="description_106"></a>

Summation is the sum over a predefined number of periods.

#### Usage <a href="#usage_102" id="usage_102"></a>

```csharp
SUM(int period)
SUM(IDataSeries inSeries, int period)
SUM(int period)[int barsAgo]
SUM(IDataSeries inSeries, int period)[int barsAgo]
```

#### Return value <a href="#return-value_100" id="return-value_100"></a>

**double**

When using this method with an index (e.g. **SUM**(14)\[**int** barsAgo] ), the value of the indicator will be issued for the referenced bar.

#### Parameters <a href="#parameters_93" id="parameters_93"></a>

inSeries Input data series for the indicator

period Number of bars included in the calculations

#### Visualization <a href="#visualization_97" id="visualization_97"></a>

![Summation (SUM)](https://agenatrader.github.io/AgenaIndicator-documentation/media/SUM.jpg)

#### Example <a href="#example_97" id="example_97"></a>

```csharp
// Sum of the volume for the last 10 trading days
Print(SUM(Volume,10)[0]);
```
