cTrader backtesting: how to backtest a cBot, and where to test it next

GuidesDeutsch

cTrader backtesting: how to backtest a cBot, and where to test it next

cTrader backtesting runs a cBot over historical data in cTrader, on ticks, M1 or H1 bars from the broker's server, with commission and spread settings and a visual mode. A cBot can also be imported into the Orion Quant Technologies Engine, where the AI assistant translates it so it runs on the engine's own market data and cost model.

Updated · Orion Quant Technologies

How do you backtest a cBot in cTrader?

A cBot is backtested in cTrader by choosing a symbol, a period and the data type, tick, M1 or H1, and starting the backtest in the desktop app. cTrader uses tick and bar history from the broker's server, applies commission and fixed or random spread settings, checks margin with stop out since version 5.9, and can replay the test in visual mode at adjustable speed.

Results come as an HTML backtest report, and the cTrader CLI gives JSON output and runs backtests locally or on your own server. For parameters, cTrader has grid optimization over all parameter sets and a genetic algorithm. cBots are written in C# on the cAlgo API, and in Python since version 5.4.

Does cTrader backtesting use tick data?

Yes. cTrader can backtest a cBot on tick data from the broker's server, or on M1 or H1 bars, chosen per backtest. Tick data matters for any cBot with tight stops, because only ticks show whether the stop or the target was reached first inside a bar.

The Orion Quant Technologies Engine has its own archive with minute bars and every tick with institutional bid and ask, including the size at the best price. Testing on a second, independent data source shows whether a result depends on one broker's feed. More in tick data backtesting.

Can you run a cBot outside cTrader?

Yes. In the Orion Quant Technologies Engine you import the cBot, and the AI assistant in the app translates it into a strategy the engine runs. Validate checks the translation before the run, and code that fails goes back to the model with the errors. You do not rewrite it by hand.

Once translated, the cBot is a strategy like any other: it backtests on the engine's archive with its costs, and it can be optimized, audited and exported again. The documentation describes the import.

What does cTrader have built in, and what does the engine add?

cTrader is a full trading platform: it writes, backtests and trades cBots, runs them around the clock in the free cTrader Cloud and executes orders natively at cTrader brokers. The Orion Quant Technologies Engine is a research tool that adds robustness checks around a strategy. The table compares what each has built in.

FeaturecTraderOrion Quant Technologies Engine
LanguagesC# cBots on the cAlgo API, Python since 5.4Python, C#, Pine Script, visual blocks, imported cBots translated by the AI assistant
Market dataTick and bar history from the broker's serverOwn archive: minute bars and ticks with institutional bid and ask
Data per backtestTick, M1 or H1OHLC, minute bars or ticks, recorded with each run
CostsCommission and fixed or random spreadSpread, commission per lot and side, swap with triple rollover
OptimizationGrid and genetic optimizationGrid and genetic search, parameter heatmap
Walk forwardNot built in, done by hand with date rangesBuilt in, on rolling or anchored windows
Out of sampleNo built in split, dates held back by handHeld back range, the gap shown for every pass
Monte CarloNot built in, plugins can add itThousands of reshuffled trade sequences
Prop firmsStore lists prop challenges and their rulesProp firm check on thirteen account sizes
ExportExports .algo files, no MT5 conversionExports cBot, .mq5 and Pine
Live tradingNative execution at cTrader brokers, cTrader CloudNone with real money, demo orders to cTrader

How do you turn a Python or Pine strategy into a cBot?

In the desktop app, the Orion Quant Technologies Engine prints a strategy built from blocks, written in Pine, taken from the built in strategies, or written in Python that compiles to the engine's strategy format as a cTrader cBot. The export lists every construct it translated, and it is exact or it refuses, never a guess.

  1. Build the strategy in Python, Pine Script or visual blocks, or describe it to the AI assistant.
  2. Backtest it on ticks with spread, commission and swap.
  3. Test robustness with out of sample, walk forward and Monte Carlo.
  4. Export it as a cBot and take the file to cTrader yourself.
  5. Backtest it again in cTrader on your broker's data, then run it on a demo account.

The exported cBot runs on cTrader's own engine and data, so its trades will not match the engine's backtest one for one. Compare both reports before you trust either. For Python and Pine details see Python backtesting and Pine Script backtesting.

Frequently asked questions

Do I have to rewrite my cBot to test it in the engine?

Not by hand. You import the cBot, and the AI assistant in the app translates it into a strategy for the engine. Validate checks the result before the run, and code that fails validation goes back to the model with the errors until it passes. Read the translated strategy once before you trust the result.

Can I backtest a cBot in the browser?

In cTrader, backtests need the desktop app, and cTrader Web is for trading. In the Orion Quant Technologies Engine, the browser build sends every run to our servers, since it has no local engine. The desktop app keeps the engine and the data cache on your own machine.

Does cTrader have walk forward analysis?

cTrader has no built in walk forward. It is done by hand with date ranges, and out of sample periods are held back by hand as well. The Orion Quant Technologies Engine runs walk forward on rolling or anchored windows and shows every pass with its out of sample result and the gap to the in sample result.

Can the engine turn a strategy into both a cBot and an MT5 Expert Advisor?

Yes, for a strategy built from blocks, written in Pine, taken from the built in strategies, or written in Python that compiles to the engine's format. It prints as a cBot, an .mq5 Expert Advisor or a Pine script. An imported cBot gets there through the AI assistant: once it is translated into an engine strategy, it exports like the others.

Research and testing only. A backtest shows how rules behaved in the past, not what they will earn. Nothing here is investment advice.

Orion Quant Technologies