The short answer

Python is now a first-class language for automating on cTrader. Spotware's announcement of native Python support in the upcoming cTrader Windows 5.4 release — refreshed November 27, 2026 — says cBots, indicators and plugins can be built in Python alongside the existing C# support, with the same trading API, ready-made sample scripts and a creation wizard to start from. If you write Python and trade on a cTrader broker, the language barrier to automation just fell. Below is a complete first cBot — a 10/30 moving-average crossover in Python — plus what its logic did on 500 synthetic bars, and the four gaps between a passing backtest and a live system.

What the 5.4 update actually changes

Three things, all from Spotware's own announcement and cTrader's help pages.

First, language choice. cBots were C# programs. With 5.4, you choose Python or C# when you create a cBot, and both get the same API — indicators, orders, positions, account data. Spotware calls cTrader the first platform to offer native Python support for algo development, and the help pages now document Python cBots as a current, supported path, not an experiment.

Second, the on-ramp. Choosing Python gives you ready-made sample scripts mirroring the C# ones, and the bot creation wizard walks you through setup. cTrader's help also publishes free Python and C# sample cBots — market-order, indicator and breakout examples — in its documentation and on GitHub, so you start from working code rather than a blank file.

Third, nothing about the lifecycle changes. A cBot is still a class with parameters and four event methods: on_start, on_tick, on_bar_closed and on_stop. You create it, save and build it, add an instance, optionally backtest and optimise it, then start the instance. Instances run locally or in the cloud, and one cBot can run across multiple symbols and periods at once, each instance independent.

The pattern will look familiar if you followed the platform guides here before: the same shape as NinjaTrader's AI Strategy Builder and MetaTrader's Expert Advisors — code, backtest, instance, live. Only the language and the broker connection change.

Your first cBot: a 10/30 crossover in Python

The strategy is deliberately boring. A crossover is the simplest logic that exercises every part of the lifecycle, and boring is what you want while you learn the platform.

import clr
clr.AddReference("cAlgo.API")
from cAlgo.API import *
from robot_wrapper import *

class SmaCross():
    def on_start(self):
        self.fast = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 10)
        self.slow = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 30)

    def on_bar_closed(self):
        fast_now = self.fast.Result.Last(0)
        fast_prev = self.fast.Result.Last(1)
        slow_now = self.slow.Result.Last(0)
        slow_prev = self.slow.Result.Last(1)

        if api.Positions.Count == 0 and fast_prev <= slow_prev and fast_now > slow_now:
            api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, "SmaCross", 20, 40)
        elif api.Positions.Count > 0 and fast_prev >= slow_prev and fast_now < slow_now:
            for position in api.Positions:
                api.ClosePosition(position)

Three decisions worth noticing. First, the logic runs on bar close, not on every tick — one decision per closed bar, which keeps the backtest and the live behaviour identical. Second, the stop-loss and take-profit travel with the order (20 and 40 pips), so risk is defined at entry, not managed by hope. Third, the exit is the mirror of the entry: when the fast average crosses back below the slow one, the position closes. No discretion, no second-guessing — the cBot does exactly what the rules say, including when the rules are wrong.

One cTrader quirk to know: Python cBots declare their customisable parameters in a companion .cs file. The code above hardcodes 10 and 30 while you learn; move them to parameters once the logic earns your trust.

What the logic did on 500 synthetic bars

Before the code touches a demo account, run its logic somewhere you can see every trade. I mirrored the same 10/30 crossover in plain Python on 500 synthetic hourly bars (seed 42, starting price 1.0850), and the run produced: 9 entries, 9 closed trades, 5 winners, final equity $10,105.01 from $10,000, maximum drawdown 2.28%. The first trade bought at bar 57 at 1.08245 and sold at bar 87 at 1.08507 for +$26.18.

Read that result correctly: it proves the logic runs, entries fire on crossovers and exits fire on cross-backs. It proves nothing about future returns — synthetic prices have no trend, no regime and no costs. A backtest that "works" on made-up data is a smoke test, not evidence. The same discipline applies to the real backtest inside cTrader: check individual trades before you believe the equity curve.

Backtest it inside cTrader before it goes live

cTrader's backtesting runs a cBot on historical data — tick data from the server or minute bars, with spread and commission settings you control — and optimisation repeats the backtest across parameter combinations, by grid or genetic algorithm. Since version 5.10 you can also import your own tick data as a CSV, and a Monte Carlo option exists. That is the order of operations: backtest first, optimise second, and treat the optimised parameters with suspicion — the best-looking parameters on history are the ones most likely to fail live.

The four gaps between a backtest and a live system

  1. Costs. A backtest with the wrong spread or no commission is fiction. Set the spread and commission to your broker's actual numbers before you trust any result.
  2. Optimisation. A grid search that tries hundreds of parameter pairs will find a lucky one. Walk the parameters forward instead — validate on data the optimisation never saw.
  3. Hosting. A cBot instance runs locally or in the cloud. Local means your machine must stay on; cloud means the platform hosts it. Pick before you go live, not after a disconnect.
  4. Scope. One instance covers one symbol and one period. Scaling to five symbols is five instances, five sets of parameters, five things to monitor — not one cBot doing five jobs.

The full loop — signal, risk, order, monitoring — is the same on every platform; the end-to-end automation guide walks it with working code. The same crossover idea in Pine Script is covered in the TradingView v6 guide.

What to do next

Build the crossover above in cTrader Algo — new cBot, Python, paste, build, backtest on a demo symbol — and watch the first ten trades by hand before you let it run unattended. If you'd rather describe the strategy in plain words and have an engineer build it, that's the embedded-engineer model: you describe the rules, the engineer builds the system — and the same engineering team behind QuantIDE also ships custom systems for businesses through BlackShore Agency.