A Premium Charting and Trading Platform for Manual Trading and automated trading, cTrader is a popular multi-asset Forex and CFD trading platform with extensive charting features, level II pricing, and quick entry and execution. The cTrader Automate feature allows you to automate your trading process with cBots and improve your trading with Indicators. The cBots are custom-configurable strategies that can execute trades without the need for human intervention or supervision. The indicators are utilized in manual trading as well as in cBots to highlight trends and provide signals for prospective changes in trends. The Automate code editor may be used to create cBots and Indicators, backtest them for accuracy, and then use them.

cTrader Trading application programming interface (API)

It supports both synchronous and asynchronous trade operations. The synchronous operation indicates that each statement in the code will be executed before moving on to the next. When a request is sent to the server in an asynchronous operation, the program continues to execute the next statements without waiting for a response from the server.

cBots

The cBots tab of the cTrader Automate main menu lists all of the cBots. There are various sample cBots in the list by default that you can add or design before adding or designing your custom cBots.

Creating a cBot

Step 1: Go to the cBots tab and click New in the upper right side. The new cBot will appear at the bottom of the cBots list, with its code shown in the right-hand source code editor. One can rename their cBot at any moment by entering in a new name or selecting Rename from the drop-down menu when right-clicking the cBot preview. Alternatively, one can press F2 while selecting the cBot.

An image showing the process of creating a cBots

Step 2: In the code editor, paste your cBot code. You can edit your cBot by copying and pasting code from another source or using the code examples from the API Reference Explorer on the right.

Step 3: Save your code by right-clicking on your cBot in the cBots tab and selecting Save from the drop-down menu, or by clicking Save in the upper left corner of the editor.

Step 4: You must convert your algorithm into a working cBot before you can use it to trade. To build a cBot, go to the cBot menu and click the Build icon at the top of the code editor. If the build was successful, you’ll be notified in the Build Result viewer with the appropriate message.

Running a cBot

Create a new instance of your cBot by clicking the plus (+) icon and selecting a Symbol to trade from the drop-down list or using the advanced search to get started.

An image showing process of running a cBot

 

The new cBot instance will be added below, and its details will immediately expand to the right. Click the Play button in the upper right corner of your cBot instance preview to start a cBot. You can choose a symbol to trade and adjust the cBot parameters before you start your cBot. It’s worth noting that only the settings you’ve enabled will be editable.

Creating an indicator

The indicators are used to indicate trends and provide signals for future changes in trends. Custom indicators can be created using the code editor. Additionally, the cTDN Indicators section allows you to download custom indicators created by other users.

Step 1: Click New in the upper right corner of the Indicator tab to add a new template to the code editor. At the bottom of the cBots list, a new indicator will appear. You may rename your Indicator at any moment by entering in a new name or selecting Rename from the drop-down menu when right-clicking the Indicator preview.

Process of creating an indicator

 Step 2: Use the syntax from the Class View to edit your Indicator. When you’re finished, click Build to save your changes. In the Indicators Code Samples area, you’ll discover examples of working indicators.

Step 3: To use it, select a Symbol from the drop-down list or use the advanced search by clicking the plus (+) icon.

Process of creating an indicator

Backtesting

The automated trading and analysis platform cTrader Automate has the option to test the performance of cBots over a given time period and under certain conditions. Without this stage, the process could never be called complete. The bot designer can also set the testing time limit, start a cBot, and monitor the results to see how a cBot instance would have done.

The procedure is simple and requires only two clicks:

  1. In the Backtesting tab on the right, choose the cBot instance you want to test. 
  2. Use the drop-down calendars, type in the dates, or drag the slider between them to define a time frame.

Advanced backtesting process

Visual

cTrader Automate backtesting process can also be visual if you choose it so in the cBots backtesting tab. Hence, you follow your robot’s progress in real-time, with the option to control the speed.

Step 1: Check the Visual Mode box beneath the Backtesting options icon.

Choose the settings and select the timeframe.

An image showing how to put visual backtesting on

Use the Speed slider or toggles on the right to control the speed of your cBot instance testing.  You can also modify the speed or pause to check intermediate results or make changes on the chart. 

Step 2: When you’re finished, use the Play button in the upper right corner to begin backtesting. It will begin with the settings and speed you specify, and you’ll be able to monitor it in real-time using all of the cTrader instruments, like zooming, changing the chart type, adding indicators, and drawing chart objects, among others.

During the process, you can use the progress slider to move forward on the X-axis, but you cannot move backward.

Results

Backtesting can take a long time depending on the timeframe, speed, and other parameters you choose. Looking at the Loading message provided when loading data, or the Visual Mode progress bar if Visual Mode is set, you can estimate the progress and time remaining.

The entire details of the testing results, including positions, orders, trading statistics, historical data, events, and the cBot log, will be provided once the testing is completed.

Summary

The Automate function in cTrader allows you to automate your trading process with cBots and improve your trading with Indicators as part of the strategy development process. You can make your own cBots or use the ones that are already available. You may also use the advanced backtesting option or the visual backtesting feature to backtest the cBots you’ve created.

Leave a Reply

3  +  6  =