Skip to content

Top Property

Summary

Upper Bollinger Band.

Signature

1
public abstract IndicatorDataSeries Top {get;}

Return Value

IndicatorDataSeries

Declaring Type

cAlgo.API.Indicators.BollingerBands

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 //...
 [Robot]
 public class SampleRobot : Robot
 //...
 [Parameter("Source")]
 public DataSeries Source { get; set; }
 [Parameter("BandPeriods", DefaultValue = 14)]
 public int BandPeriod { get; set; }
 [Parameter("Std", DefaultValue = 14)]
 public int std { get; set; }
 [Parameter("MAType")]
 public MovingAverageType MAType { get; set; }
 //...
 private BollingerBands boll;
 //...
 protected override void OnStart()
 {
     boll = Indicators.BollingerBands(Source,BandPeriod,std,MAType);
 }
 protected override void OnBar()
 {
     Print("Current Top Bollinger Band's price is: {0}", boll.Top.LastValue);
 }
 //...

Last update: March 30, 2023