Sum


Summary

Calculates the sum of a dataseries, over the specified period.

Syntax

public static double Sum(DataSeries series, int period)

Parameters

NameDescription

Example 1

SimpleMovingAverage sma;
//...
public override void Calculate(int index)
{
    //The sum of the simple moving average series of the last 20 bars
    var sumSma = Functions.Sum(sma.Result, 20); 
    //...
}