EndIndex: Integer;
EndIndex: integer;
The EndIndex property returns series end index.
To get the number of series calculation dates use the following formula: EndIndex - ITimeSeries.StartIndex + 1.
This example describes custom method. The data series is passed by points.
Add links to the MathFin, Ms system assemblies.
Public Function UserFuncSt(Input: ITimeSeries): Double;
Begin
If (Input.EndIndex - Input.StartIndex) > 50
Then Return Math.Log10(Input.CurrentValue);
Else Return Double.Nan
End If;
End Function UserFuncSt;
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 UserFuncSt(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 UserFuncSt;
See also: