# Looking back: prev

prev(x) is x on the bar before; prev(x, n) is n bars back.

- `prev(x)` is `x` one bar ago, `prev(x, 5)` five bars ago (Pine's `x[1]` and `x[5]`).
- The count must be fixed: a number or a setting, not something that changes from bar to bar.
- Before there is an earlier bar the value is empty; `fallback(prev(x), y)` fills it.

```vex
rose = close > prev(close)
momentum = close - prev(close, 10)
plot(momentum, "Momentum")
mark(rose and prev(rose) and prev(rose, 2), "3", where = below)
```

See also: [prev](/documentation/vex/reference/windows#prev), [Values that carry over: starts](/documentation/vex/values-that-carry-over-starts), [fallback](/documentation/vex/reference/maths#fallback)
