Home/Dovee/Function reference

history

Previous bars: close 1 bars ago is the prior close.

Reference/Language/Language

close 1 bars ago

Write series N bars ago (or N bar ago). Works on price and on any plot variable. The shorthand close[1] is the same thing — keep it for short scripts; teach the English form first. There is no future leak — only past offsets.

Return value

series

Note

  • Advanced shorthand: close[1] and close[1 bars ago].

Example

when close is above close 1 bars ago and close 1 bars ago is above close 2 bars ago
  buy

See also