StartIndex: Integer;
StartIndex: integer;
The StartIndex property returns start index for series.
To get the number of series calculation dates use the following formula: ITimeSeries.EndIndex - StartIndex + 1.
This example describes custom method. The data series is passed by points.
Add links to the MathFin, Ms system assemblies.
Public Function UserFunc(Input: ITimeSeries): Double;
Begin
If (Input.EndIndex - Input.StartIndex) > 50
Then Return Math.Log10(Input.CurrentValue);
Else Return Double.Nan
End If;
End Function UserFunc;
The method returns base-10 logarithm of the series if it contains more than 50 points.
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 UserFunc(Input: ITimeSeries): Double;
Var
Math: MathClass = New MathClass();
Begin
If (Input.EndIndex - Input.StartIndex) > 50
Then Return Math.Log10(Input.CurrentValue As double);
Else Return Double.Nan
End If;
End Function UserFunc;
See also: