Skip to content

RobotStartDialog

Summary

Represents a common dialog box that allows a user to start a cBot.

Signature

1
public class RobotStartDialog

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 using cAlgo.API;
 namespace cAlgo.Robots;
 [Robot(AccessRights = AccessRights.None)]
 public class TestExample : Robot
 {
     protected override void OnStart()
     {
         var robotType = (RobotType)AlgoRegistry.Get("Sample Breakout", AlgoKind.Robot);
         var robotStartDialog = new RobotStartDialog(robotType);
         robotStartDialog.ShowDialog();
     }
 }
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 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):
         robotType = RobotType(api.AlgoRegistry.Get("Sample Breakout", AlgoKind.Robot))
         robotStartDialog = RobotStartDialog(robotType)
         robotStartDialog.ShowDialog()

Methods

ShowDialog

Summary

Shows the dialog.

Signature

1
public void ShowDialog()

Return Value

void

SetProperty

Signature

1
private void SetProperty(T& field, T value)

Parameters

Name Type Description
field T&
value T

Return Value

void

GetProperty

Signature

1
private T GetProperty(T& field)

Parameters

Name Type Description
field T&

Return Value

T

Properties

RobotType

Summary

Gets or sets the Robot Type.

Signature

1
public RobotType RobotType {get; set;}

Return Value

RobotType

Related Tutorials