Item(Index: Integer): Variant;
Item[Index: integer]: object;
Index. Series point index.
The Item property determines value of series point by its index.
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.
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: