rev (vars Data, int length): vars

Returns a reverse copy of the Data series so that it starts with the oldest elements. Useful for sending data series to other software that needs the series in old-to-new order.

Parameters:

Data The series or array to be reversed.
length The number of elements to be reversed; LookBack if omitted.

Returns

New series in reverse order.

Remarks

Example:

// generate reverse price series (latest prices last)
vars O = rev(series(priceOpen())),
  H = rev(series(priceHigh())),
  L = rev(series(priceLow())),
  C = rev(series(priceClose()));

See also:

series, diff

► latest version online