# Rolling sum

`sum`

The sum of the last values over a number of bars.

## Inputs

| Name | Type | Default | Range |
| --- | --- | --- | --- |
| source | source | close |  |
| period | int | 30 | 1 to 5000 |

## Outputs

| Name | Kind |
| --- | --- |
| sum | value |

Warm-up: period - 1 bars (29 at the defaults).

Repaints: No.

## Formula

The sum of the last period values. A window holding a missing value has no value.
