Skip to content

ToString Method

ToString

Summary

The name of the indicator derived class.

Signature

1
public string ToString()

Return Value

string

Declaring Type

cAlgo.API.Indicator

Examples

1
2
3
4
5
6
 //...
 public override void Calculate(int index)
 {
     //This is where we place our indicator's calculation logic.
 }
 //...
1
2
3
4
5
6
 //...
 protected override void Initialize()
 {
 //Place your Initialization logic here
 }
 //...
1
2
3
4
5
6
7
8
9
 private IndicatorDataSeries input;
 protected override void Initialize()
 {
     input = CreateDataSeries();
 }
 public override void Calculate(int index)
 {
     input[index] = (MarketSeries.Close[index] + MarketSeries.Open[index]) / 2;
 }
1
2
3
4
5
6
7
8
9
 //...
 public override void Calculate(int index)
 {
     if (IsRealTime)
     {
         //Place the code-logic that you want to be calculated on incoming live data
     }
 }
 //...

Last update: July 1, 2022

Comments