Skip to content

Introduction

Introduction

cTrader Algo is an all-in-one solution that gives traders users the opportunity to use various automated trading tools including custom indicators and cBots.

Note

It is only possible to develop new indicators or cBots when using cTrader Desktop.

Defining cBots

Think of cBots as programs that run inside cTrader and autonomously execute and manage trading operations. cBots can be designed to perform almost any trading activity such as modifying existing positions or placing pending orders depending on certain conditions.

Defining Custom Indicators

A custom indicator is another type of extension that you can develop yourself and/or procure from other developers. Custom indicators can be used to run calculations on cTrader charts using price data, chart drawings, account properties and more.

Indicators can display the results of these calculations on the charts to which they are attached, in separate tabs, or using whatever custom method of output you could design using the features provided by the API.

How to Start Developing a cTrader Algorithm

To develop a custom indicator or a cBot, you need to use the C# programming language and the .NET platform.

A basic understanding of both C# and .NET is required for creating indicators or cBots. This documentation includes the 'C# and .NET Basics' section that contains essential information about both of these tools. However, we also encourage you to search external resources for relevant tutorials and documentation.

Documentation Structure

You can read this technical documentation beginning-to-end or simply refer to the section(s) that pose the most interest.

If a code snippet in one section seems unfamiliar or difficult to understand, you can always find more examples in related sections. For example, the 'Creating an Indicator' and 'Indicator Code Samples' articles explain and demonstrate the key principles of how custom indicators work in cTrader Algo.

You can also consult our references library to learn more about the members of this API. If you see an unfamiliar method or a class in a code snippet, there is a high chance that the references library contains its overloads or properties along with a brief description.

The Prerequisites for Working With cTrader Algorithms

There are two main prerequisites you have to meet before working with cBots and indicators.

  • Download and install .NET Runtime.
  • Download and install the latest version of cTrader, and log in under one of your accounts.

cTrader Desktop comes with a built-in compiler that can be used to develop relatively simple robots and indicators. However, you will not be able to use most of the advanced features of cBots/indicators (such as creating custom UI controls) without switching to the .NET SDK compiler. .NET SDK has to be downloaded and installed separately before you can use it in cTrader Desktop.

Note

The .NET SDK already includes .NET Runtime. There is no need to download and install both at the same time.

cTrader includes a [built-in code editor](ui-basics.md#code-editor) that fully supports IntelliSense (a code 'advisor' that can be used for auto-completing expressions and statements). However, you may also choose to develop indicators and cBots via a third-party IDE such as Visual Studio Code. This documentation contains detailed information on using the embedded code editor and external IDEs.