rev(vars Data, int Length): vars
Generates a reverse copy of the Data series which starts with the oldest elements. Useful for sending data series to other software that needs the series in old-to-new order.
conv(float* fData, int Length, int Stride): vars
Converts a float array to a temporary var series, for
passing it to functions as a series parameter.
The optional Stride parameter gives the number of fData
elements to skip, for extracting columns from multidimensional arrays.
Parameters:
Data |
Series or array. |
Length |
The number of elements; LookBack if
0. |
Stride |
Index increase, or 0 for one-dimensional
arrays. |
Returns
series.
Remarks
- The rev function generates a dynamic
series and must be called in a fixed order in the
script.
- The conv function generates a temporary series. It
only keeps its content until the next conv call.
Example:
// generate reverse price series (latest prices last)
vars O = rev(seriesO(),0),
H = rev(seriesH(),0),
L = rev(seriesL(),0),
C = rev(seriesC(),0));
See also:
series, diff,
shift
► latest
version online