Skip to content

ProgressBar

Summary

Progress bar control.

Signature

1
public class ProgressBar : ControlBase

Namespace

cAlgo.API

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
25
 using cAlgo.API;
 namespace cAlgo.Robots;
 [Robot(AccessRights = AccessRights.None)]
 public class TestExample : Robot
 {
     private ProgressBar _progressBar;
     protected override void OnStart()
     {
         _progressBar = new ProgressBar 
         {
             HorizontalAlignment = HorizontalAlignment.Center,
             VerticalAlignment = VerticalAlignment.Center,
             Width = 200,
             Height = 100,
             Minimum = 0,
             Maximum = 100
         };
         Chart.AddControl(_progressBar);
         Timer.Start(1);
     }
     protected override void OnTimer()
     {
         _progressBar.Value += 5;
     }
 }
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 using cAlgo.API;
 namespace cAlgo.Robots;
 [Robot(AccessRights = AccessRights.None)]
 public class TestExample : Robot
 {
     protected override void OnStart()
     {
         var progressBar = new ProgressBar 
         {
             HorizontalAlignment = HorizontalAlignment.Center,
             VerticalAlignment = VerticalAlignment.Center,
             Width = 200,
             Height = 30,
             IsIndeterminate = true
         };
         Chart.AddControl(progressBar);
     }
 }
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 import clr
 clr.AddReference("cAlgo.API")
 # Import cAlgo API types
 from cAlgo.API import *
 # Import trading wrapper functions
 from robot_wrapper import *
 class Test():
     def on_start(self):
         self.progressBar = ProgressBar()
         self.progressBar.HorizontalAlignment = HorizontalAlignment.Center
         self.progressBar.VerticalAlignment = VerticalAlignment.Center
         self.progressBar.Width = 200
         self.progressBar.Height = 100
         self.progressBar.Minimum = 0
         self.progressBar.Maximum = 100
         api.Chart.AddControl(self.progressBar)
         api.Timer.Start(1)
     def on_timer(self):
         self.progressBar.Value += 5
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 import clr
 clr.AddReference("cAlgo.API")
 # Import cAlgo API types
 from cAlgo.API import *
 # Import trading wrapper functions
 from robot_wrapper import *
 class Test():
     def on_start(self):
         progressBar = ProgressBar()
         progressBar.HorizontalAlignment = HorizontalAlignment.Center
         progressBar.VerticalAlignment = VerticalAlignment.Center
         progressBar.Width = 200
         progressBar.Height = 30
         progressBar.IsIndeterminate = True
         api.Chart.AddControl(progressBar)

Properties

IsIndeterminate

Summary

Gets / sets whether the ProgressBar shows actual values or generic, continuous progress feedback.

Signature

1
public bool IsIndeterminate {get; set;}

Return Value

bool

Value

Summary

Get / set progress bar value amount if type is Determinate.

Signature

1
public double Value {get; set;}

Return Value

double

Minimum

Summary

Get / set progress bar minimum value amount if type is Determinate (default is 0).

Signature

1
public double Minimum {get; set;}

Return Value

double

Maximum

Summary

Get / set progress bar maximum value amount if type is Determinate (default is 100).

Signature

1
public double Maximum {get; set;}

Return Value

double