Guides

cTrader Algo Guide: cBots, Indicators, Backtesting and the cTrader Store

A practical guide to algorithmic trading on cTrader: what cBots and custom indicators are, how backtesting and optimisation work, and how Store products are installed and run.

By AlgoXP4 min read

cTrader Algo workflow from idea through cBot code, backtest, optimization and demo to live trading

cTrader is one of the few retail trading platforms where algorithmic trading is built in rather than bolted on. This guide explains the pieces you work with - cBots, custom indicators, backtesting, optimisation and the cTrader Store - and how they fit together, from an idea to a strategy running on a live account.

The building blocks

Component What it is Places trades? Where it runs
cBot A trading robot written in C# Yes cTrader Cloud (from any app) or locally on cTrader Windows/Mac
Custom indicator A chart tool written in C# No cTrader Windows and Mac
Plugin An extension of the cTrader interface Depends on the plugin Desktop or multi-platform, depending on type
cTrader Store Official marketplace for cBots, indicators, plugins and copy strategies - Linked to your cTrader ID

cBots and custom indicators are written in C# using the cTrader API, and the same platform contains the tools to backtest and optimise them. Indicators analyse data and draw on the chart; they do not place trades by themselves - that is the job of a cBot or of the trader.

From idea to live strategy

A reliable workflow has the same stages whether you build a cBot yourself or use a ready-made one:

  1. Define the rules. Entry, exit, stop-loss, position size and the conditions under which the strategy should not trade. See What is a trading bot.
  2. Backtest on historical data with realistic costs.
  3. Optimise carefully - look for stable parameter regions, not a single best result.
  4. Validate on data the optimisation did not see: walk-forward or out-of-sample tests, plus Monte Carlo stress tests.
  5. Forward test on a demo account.
  6. Go live small, with account-level risk limits in place.

Backtesting in cTrader

A backtest lets a cBot trade on historical data without affecting any account. cTrader offers several data sources:

Data source Accuracy Speed Typical use
Tick data from server Highest - every price update, real spreads Slowest Final checks, scalping, grids, breakouts
M1 bars from server Good compromise Faster Early experiments, longer-timeframe systems
M1 bars from CSV Depends on your file Fast Your own historical data
H1 bars from server Lowest Fastest Rough checks of slow strategies

cTrader can also backtest cBots on Renko and range bar charts. Two practical points matter more than the settings:

  • Costs. Make sure spreads, commission and swaps in the test reflect your real account. Tick data from the server comes from the broker’s price feed, so results can differ between brokers.
  • Execution. A backtest fills orders at the tick price; it cannot reproduce real-world latency or every slippage scenario. Treat good results as a hypothesis, not a promise. Our article Why a killer backtest does not guarantee live profits explains the usual gaps.

For the metrics to read after a test - net profit, drawdown, profit factor, Sharpe ratio, recovery factor - see Key metrics in backtesting.

Optimisation in cTrader

cTrader’s optimiser runs many backtests with different parameter values and ranks them by criteria you choose (for example net profit, drawdown or a custom fitness). Two search methods are available:

  • Grid (exhaustive) search tests every combination. Accurate but slow when there are many parameters.
  • Genetic algorithm evolves parameter sets and tests far fewer combinations; cTrader’s documentation describes it as significantly faster for finding good values.

The danger is not the method but the goal. An optimiser will always find some parameter set that looks excellent on past data. Prefer settings that sit in a broad region of good results, and confirm them out of sample. Read Over-optimization: dangers and how to avoid it, Walk-forward optimization and Genetic algorithms in trading optimization.

Running cBots: cloud or local

  • Cloud: a cBot started in cTrader Cloud keeps running when your computer is off, and it can be started from any cTrader app.
  • Local: a cBot started on cTrader Windows or Mac runs on that machine and stops when the app closes.

Whichever you use, add an account-level safety net. A tool such as T-Rex Risk Guardian enforces daily and weekly loss limits across manual trading and other cBots - useful for prop-firm rules.

Getting products from the cTrader Store

The cTrader Store is the official marketplace for cBots, custom indicators, plugins and copy strategies. Key points for buyers:

  • Purchases are linked to your cTrader ID, not to a broker. If you open an account with another cTrader broker under the same ID, your products remain available.
  • Products work on both demo and live accounts - test on demo first.
  • Custom indicators from the Store install on cTrader Windows and Mac only; cBots can run in the cloud or locally.
  • Sellers can offer one-time purchases, free versions, trials and subscriptions; check each listing for the current terms.
  • Store products are software tools. They do not provide personal investment advice or guarantee results.

All AlgoXP bots and indicators are distributed this way: each product page on this site describes the logic, parameters and risks, and links to the official Store listing.

A checklist before going live

  • The rules are written down, including when the strategy must stay flat.
  • The backtest uses tick data and realistic costs for your broker.
  • Parameters come from a stable region, confirmed out of sample.
  • Monte Carlo or stress tests show a drawdown you can tolerate.
  • The strategy ran on demo for long enough to see several market conditions.
  • Position size and account-level loss limits are set before the first live trade.

Algorithmic trading does not remove risk; it makes your decisions repeatable and testable. That is its real advantage - and the reason testing deserves more time than coding. See our risk disclosure.

FAQ

What is a cBot?

A cBot is a trading robot for cTrader, written in C# with the cTrader Algo API. It can open, manage and close positions automatically according to its rules, and it can be backtested and optimised inside cTrader.

Do custom indicators place trades?

No. Indicators analyse price data and draw signals, levels or zones on the chart. Trades are placed by you or by a cBot.

Can a cBot run when my computer is off?

Yes, if you start it in cTrader Cloud. Cloud cBots can be started from any cTrader app and keep running with your device switched off; cBots started locally run on cTrader Windows or Mac and stop when the app closes.

Which backtesting data should I use in cTrader?

Tick data from the server is the most accurate source and reproduces spreads and intrabar moves. M1 bars from the server are a faster compromise for early experiments. Confirm promising results on tick data before trusting them.

Do I need to know C# to use AlgoXP products?

No. AlgoXP cBots and indicators are delivered compiled through the cTrader Store. You install them, choose parameters or presets and run backtests, demo or live trading in the standard cTrader interface.

Sources and further reading

  1. Spotware: cTrader Automate (C# API, backtesting and optimisation) - spotware.com
  2. cTrader Help: Backtesting and optimising cBots - help.ctrader.com
  3. cTrader Help: Backtest a trading bot - help.ctrader.com
  4. cTrader Help: Optimise a cBot - help.ctrader.com
  5. cTrader Help: cTrader Store FAQ - help.ctrader.com
  6. cTrader: Store buyer FAQ - ctrader.com
  7. cTrader: Indicators FAQ - ctrader.com