ITimeSeries.PointCount

Syntax

PointCount: Integer;

Description

The PointCount property returns the number of series points.

Comments

The PointCount property is calculated as m-1, where m is the maximum number of points which is loaded before problem calculation. Before loading problem calculation dates are extended by one year from both sides, therefore the PointCount property is not intended to get the number of calculation dates.

To get the number of series calculation dates use the following formula: ITimeSeries.EndIndex - ITimeSeries.StartIndex + 1.

Example

This example describes custom method. The data series is passed by points.

Add links to the MathFin, Ms system assemblies.

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

The method returns the base-10 logarithm of the series.

See also:

ITimeSeries