Skip to content

cTrader Algo API Documentation

This documentation is the entry point for the cTrader Algo platform API, used to build cBots, Indicators, and Plugins in C#.
Each section below groups related namespaces and functionality provided by the cTrader API.

Using the cTrader Algo API Reference with CodePilot

This API reference is designed to help you clearly describe what you want CodePilot AI to build.

When creating a request, refer to the relevant API sections, classes, or concepts listed in this documentation. This allows CodePilot to understand which platform features to use, which components to avoid, and how your cBot, indicator, or plugin should behave.

For best results:

  • State whether you are building a cBot, Indicator, or Plugin.
  • Mention the relevant API sections (for example: Market Data, Trading, Indicators, Chart).
  • Describe the execution model (OnBar, OnTick, Timer, Events).
  • Specify any user parameters, permissions, or UI controls required.

Clear references to the API reduce guesswork and result in cleaner, safer baseline implementations.

Indicators

Built in indicator definitions and base classes used to create custom technical indicators.

Strategies

A list of baseline automated trading systems that can be extended with additional features.

Trading

Core trading functionality including orders, positions, executions, symbols, and trade events.

Plugin

Base classes and APIs for creating cTrader plugins with UI and extended platform access.

Chart

APIs for interacting with charts, including drawing objects, chart events, timeframes, and symbol visualisation.

Controls

UI control components used primarily in plugins and custom panels, such as buttons, grids, labels, and inputs.

Dialogs

Provides modal and non modal dialog functionality for user interaction within plugins.

Account

APIs related to trading accounts, account properties, balances, equity, margin, and account level information used by cBots and plugins.

Market Data

Access to real time and historical market data, including ticks, bars, symbols, and sessions.

Messages

Messaging APIs used for internal communication, logging, and structured message handling.

Notifications

Provides access to platform notification features such as alerts and user messages.

HTTP

Provides HTTP client functionality for making external web requests from cBots, indicators, or plugins.

Local storage

APIs for storing and retrieving persistent local data associated with an Algo component.

Price Alert

APIs for creating and managing price based alerts within the platform.

Timer

Provides timer based execution for scheduling recurring tasks inside cBots and plugins.

WebSocket

Provides WebSocket client support for real time external data feeds and integrations.

AlgoRegistry

Provides access to the Algo Registry, allowing interaction with registered indicators, cBots, and plugins within the platform.

Application

Contains application level information and lifecycle features related to the running cTrader environment.

Attributes

Defines attributes used to describe indicators, cBots, and plugins, such as metadata, parameters, and runtime behaviour.

Collections

Provides collection types and helpers commonly used throughout the API for handling groups of objects.

Compilation

APIs related to compilation, build information, and runtime status of Algo components.

EventArgs

Event argument classes used across the API for handling platform, chart, trading, and data events.

General

Core types, base classes, enums, and shared functionality used across all areas of the cTrader Algo API.

Optimization

APIs used for strategy optimisation, parameter sweeps, and backtesting scenarios.

Period

Defines time periods and time related helpers used throughout charts, indicators, and market data.

Permissions

Controls access rights and security permissions for Algo components.

Utility

Helper classes and utility functions that support common tasks across the API.

Watchlists

APIs for accessing and monitoring user watchlists and their associated symbols.