# LINT_WHOLE_SERIES_AGGREGATE

A calculation in compute() uses every bar, including later ones.

## What happened

A mean, a maximum, a quantile or a similar figure taken over the whole series includes bars after the one being decided, so each bar is judged with knowledge of the future.

## What to do

Use a trailing window such as `forge.series.rolling`.

## Example

```text
strategy.py, line 29: `close.mean()` uses every bar, including later ones. Use a trailing window such as forge.series.rolling. [LINT_WHOLE_SERIES_AGGREGATE]
```

The wording of the message depends on your file, and the code does not. A warning does not stop the file from loading.
