FactorIndex: Integer;
The FactorIndex property returns the child series index if this series is an indicator.
If the child series is not an indicator, FactorIndex returns -1.
Executing the example requires a form with the following components: the Button component named Button1, the LanerBox component named LanerBox1, and the UiErAnalyzer component named UiErAnalyzer1. UiErAnalyzer1 is a data source for LanerBox1. A working area of the time series database should be loaded to UiErAnalyzer1.
The example is a handler of the OnClick event for the Button1 component.
Add links to the Express, ExtCtrls, Forms, Laner, and Tab system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
pSerie: ILanerDerivedSerie;
Begin
If LanerBox1.SelectedSeriesCount > 0 Then
If LanerBox1.SelectedSeries(0) Is ILanerDerivedSerie Then
pSerie := LanerBox1.SelectedSeries(0) As ILanerDerivedSerie;
Debug.WriteLine("Series index: " + pSerie.FactorIndex.ToString);
Else
Debug.WriteLine("Series is not a child one");
End If;
End If;
End Sub Button1OnClick;
After executing the example the console window displays index of a highlighted series if the series is a child one.
See also: