ITimeSeries.Item

Fore Syntax

Item(Index: Integer): Variant;

Fore.NET Syntax

Item[Index: integer]: object;

Parameters

Index. Series point index.

Description

The Item property determines value of series point by its index.

Fore Example

This example describes custom method. Executing the example requires that a data series should be passed by points.

Add links to the MathFin, Ms system assemblies.

Public Function UserInput(Input: ITimeSeries): Double;
Var
    i: Integer;
Begin
    If Input.PointCount > 0 Then
        i := Input.CurrentIndex;
        Return Math.Log10(Input.Item(i));
    End If;
End Function UserInput;

After executing the example the method returns natural logarithm of series.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.MathFin;
Imports Prognoz.Platform.Interop.Ms;

Public Function UserInput(Input: ITimeSeries): Double;
Var
    i: Integer;
    Math: MathClass = New MathClass();
Begin
    If Input.PointCount > 0 Then
        i := Input.CurrentIndex;
        Return Math.Log10(Input.Item[i] As double);
    End If;
    Return double.NaN;
End Function UserInput;

See also:

ITimeSeries