Basic functions
Time series.at
[date;period]→numberwithtime
Date (Date[Current date]).
Period (number[0]): The number of weekdays before <date> in which to search for a course.
Result: The At
function returns the value of the main line of the time series at the specified time or the most recent time that lies in the period of the specified number of weekdays before the specified time. If no such value is available, "n/a" is supplied.
TimeSeries.BarsBetween
[to:date;from:date]→number
Result: The BarsBetween
function returns the number of values in the specified date range between<from>and<to>(inclusive).
Time series.Before
[periods:number]
Result: The Before
function returns the value series shifted<periods>into the future. The date series of the time series is retained, the latest values are omitted. If <periods> is negative, the value series is shifted into the past.
Example: Close-Close.Before
[1] is therefore exactly the time series of the price differences to the previous trading day.
Time series.date→Time series
Result: The Date
function returns the time series of the date stamps of the input time series. The date stamps are represented by numbers, namely the number of calendar days that have passed since 30.12.1899.
Time series.FillAs
[Sample time series]→Time series
Result: The FillAs
function returns a time series that is filled with the values of the first time series at the times of the sample time series. If there is no corresponding value in the first time series at a point in time, the most recent value before the point in time is used.
PriceTimeSeries.FillGaps
[OutOfRange;Mode;Default]→TimeSeries
OutOfRange (Boolean): Determines whether the time series should also be supplemented before the first available rate and after the last available rate.
Mode ("Default"|"Left"|"Right"|"Nearest"|"Interpolate"): Determines which value is placed in a price gap:
Default: The constant value that is transferred in the Default parameter.
Left: The next value to the left of the gap, if one still exists there, otherwise to the right.
Right: The next value to the right of the gap, if one still exists there, otherwise to the left.
Nearest: The value closer to the working day under the left and right neighbor.
Interpolate: a value is determined between the two neighbors by linear interpolation.
Default (number): Supplementary value for the 'Default' mode.
Result: The FillGaps
function returns a time series in which the prices of the input price time series are retained and missing values are added. All working day rates are regarded as missing, i.e. from Monday to Friday, even if a public holiday should actually fall on such a day.
Time series.FillJoin
[Sample time series]→Time series
Result: The FillJoin
function returns a time series that is filled with its own values at the times of the sample time series. If there is no corresponding value in the first time series at a point in time in the sample time series, the most recent value in the time series before the point in time is used.
Time series.FirstAfter
[from:Date]→NumberwithTime
Result: The FirstAfter
function returns the first value of the main line of a time series from date<from>. If the parameter is not assigned, the first available value of the main line is searched for. If no value is available, "n/a" is supplied.
TimeSeries.FromTo
[to:date;from:date;number:number]→List(numberwithTime)
Result: The FromTo
function returns the values of a time series in the form of a list of time-related numbers. The range includes all values between <from> and <to> (inclusive), and additionally <number> values that lie before <from>. Fewer than <number> values can also be supplied if the time series is not correspondingly long. This step should generally be carried out after time series operations, as time series-specific operations are no longer possible once the time series has been "converted" into a list.
Time series.HL
[Line1;Line2;Line3;Line4;Line5]→Time series
Line1;Line2;Line3;Line4;Line5 (number).
Result: The HL
function provides the time series with the additional specification of up to five auxiliary lines. These auxiliary lines can be displayed in the chart.
Condition: Time series.If
(Then-case:Time series|number; Else-case:Time series|number)→Time series
Result: The If
function returns the time series that contains the simultaneous value (or number) of the Then case for each value<>0 and otherwise the simultaneous value of the Else case.
Time series.rate
[date]→numberwithtime
Result: The rate
function returns the value of the main line of the time series at the specified time. If there is no value for this date, an error is returned.
Time series.LineGet
[Line]→Time series
Line (number | string [0]): The number of the multiline (0=main line,1...4), or the name of the line (see LineNames)
Result: The LineGet
function returns a time series that contains the line of the predecessor given by<Line>as the main time series, which is a multiline time series.
Time series.LineNameGet
[Line]→String
Line (number: 0...4).
Result: The name of the corresponding multiline.
TimeSeries.LineNames
[Name0;Name1;Name2;Name3;Name4]→TimeSeries
Name0;Name1;Name2;Name3;Name4 (String).
Result: The LineNames
function returns the time series in which the multilines are named according to the parameters. These names also determine the legend entries for the lines in the chart.
TimeSeries.LinesMulti
[Line1;Line2;Line3;Line4;Line5;Line6;Line7;Line8;Line9]→TimeSeries
Line1;...;Line9 (time series): further time series.
Result: The LinesMulti
function returns a multiline time series containing the main lines of all ten arguments.
TimeSeries.LineTypeGet
[Type:LineType[Default];Consolidation:ConsolidationType [Default]]→TimeSeries
Result: The LineTypeGet
function returns the time series that contains the line of the predecessor given by<Type>,<Consolidation>as the main line.
Time series.Reconsolidate
[Interval;Consolidation]→Time series
Interval (number [1]): The consolidation period for the courses: 1=daily, 7=weekly (Monday-Friday) 30=monthly(1st-31st), other N=N-day period.
Consolidation (consolidation type [Default]).
Result: The Reconsolidate
function returns a newly consolidated time series after the specified interval. If no consolidation mode is specified, this is determined by the subsequent calculation (see GetLineType), by charting (candle charts) or by default as close consolidation.