Create / Edit cBots
To create a new cBot
- Click on Add to create a new robot and open the source code editor.
Tip: You can rename your robot by typing in the new name immediately. Selecting Rename from the robot dropdown menu. Pressing F2 on the keyboard.
- Write your code
The second and most important step is the entry of the actual algorithm/code. You can use the editor available or copy / paste your code from another source.You can save your code periodically by clicking Save or selecting Save from the dropdown menu.
For more details on coding for cAlgo with C#:
C# Beginners Guide
- Build Robot
Before you can use your algorithm to trade, you need to convert it into a working robot. To build the robot, click the build icon .
Indicates that changes were made to the code since the last build. An asterisk* will also appear beside the robot name.
Indicates that no changes were made to the code since the last build.
The Build Result area at the bottom of the platform will show you if the build was successful or if there were errors in the code.
The robot cannot be built if the code contains errors. A list of any errors in the code and the details of the errors will appear in the Build Result area at the bottom of the platform.
Tip: Clicking on an error in the list will activate the line in the code where the error resides.
To edit the algorithm for your robot, simply select the robot from the list and make your changes in the editor, or copy / paste from your editing source.
Click Save or Build to save your work.
Attention:After making changes to the code, the robot needs to be rebuilt before changes can take effect. When the source code is changed, any instances already attached to a chart will not be affected until a rebuild, and can still be run using the old code. Adding an instance means attaching a robot or indicator to a chart.
In the example below, the asterisk* and the build icon indicate that changes have been made to the code since the last build.
However there are three instances already attached which can still be run using the old code by pressing play.
The robot cannot be built if an instance is running.
Click the arrow for Robot Quick Options
Add an Instance
Attach your robot or indicator to a chart and edit parameters. Only parameters defined by the code as editable will appear here.
Save all changes made to the source code (Ctrl + S) (this will save changes to the source, but will not apply or build the source).
Click to rename your robot. This will not affect any trades opened using the robot. Shortcut key: F2
Create an identical robot.
Examples of usage: Testing multiple ‘versions’ of a robot. Making changes to the source of a robot that is running. Although it is not possible to edit the source code of a robot that is already running, you are able to duplicate the robot while it is running and work on the source code of the duplicate.
Show in folder
Open the robot file location on your computer.