cTrader — Free C# Backtesting with Modern UI
cTrader is a multi-asset trading platform developed by Spotware, known for its clean modern interface, transparent pricing, and Level II market depth. cTrader Automate (formerly cAlgo) is its algorithmic trading and backtesting environment, using full C# with .NET. The entire platform — including backtesting — is completely free through partner brokers.
cTrader Automate: C# Scripting
cTrader Automate uses standard C# compiled with .NET. Automated strategies are called “cBots” and custom indicators inherit from API base classes. The same cBot code runs in both live trading and backtesting with no changes.
Key characteristics:
- Full C# language, compiled with .NET runtime
- Built-in code editor with IntelliSense
- Visual Studio compatible for advanced development
- Event-driven:
OnBar(),OnTick(),OnStart(),OnStop() Robot(cBot) andIndicatorbase classes- Multi-symbol access via
MarketDataAPI - Async/await support for non-blocking operations
- NuGet package support — import any .NET library
- Account info, positions, pending orders, and market data all accessible
Example — simple cBot:
[Robot(AccessRights = AccessRights.None)]
public class SampleBot : Robot
{
protected override void OnBar()
{
var fast = Indicators.SimpleMovingAverage(Bars.ClosePrices, 10);
var slow = Indicators.SimpleMovingAverage(Bars.ClosePrices, 50);
if (fast.Result.Last(1) > slow.Result.Last(1)
&& fast.Result.Last(2) <= slow.Result.Last(2))
ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000);
}
}
Difficulty: Intermediate — same as NinjaTrader (both C#), but cTrader’s API is generally considered cleaner and more intuitive. Easier for developers familiar with C#.
Strategy Tester Features
The backtesting engine is built into cTrader Automate. Select a cBot, configure parameters, pick a time range, and run.
Testing Modes
- Tick data from server — real tick data where the broker provides it. Highest accuracy.
- M1 bar data with tick generation — generates ticks from 1-minute OHLC bars. Lower accuracy, faster execution.
- Open prices — bar open only. Fastest, least accurate.
Data quality depends heavily on your broker. Some cTrader brokers provide real recorded tick data; others only have M1 bars. Check with your broker before relying on tick-level results.
Optimization
- Grid (exhaustive) search — test every combination of specified parameter ranges
- Genetic algorithm — intelligent search for large parameter spaces
- Multi-parameter support
Optimization is functional but more basic than NinjaTrader’s. There’s no built-in walk-forward optimization or Monte Carlo simulation.
Results Dashboard
- Equity curve and balance curve
- Net profit, Sharpe ratio, Sortino ratio, max drawdown, profit factor
- Total trades, win rate, average trade
- Trade-by-trade list with entry/exit details
- Visual backtesting — watch trades execute on chart in real-time
Commission and Swap Modeling
Configurable per-test. By default, inherits commission and swap rates from your broker’s symbol specifications, which is convenient for realistic modeling.
Multi-Timeframe Access
cBots can access data from multiple timeframes within a single backtest. You can reference higher-timeframe bars for signal generation while executing on lower timeframes.
Supported Instruments
- Forex — primary focus, all major/minor/exotic pairs
- CFDs — indices, commodities, metals, energies
- Stocks — via CFDs, broker-dependent
- Crypto — growing support, broker-dependent
- ETFs — limited, broker-dependent
cTrader is strongest in forex and CFDs. Instrument availability depends entirely on your broker.
Pricing
cTrader is completely free. No platform fees, no license fees, no backtesting fees. Ever.
| What | Cost |
|---|---|
| cTrader Desktop | Free |
| cTrader Web | Free |
| cTrader Automate (backtesting) | Free |
| cTrader Mobile | Free |
| Demo accounts | Free, unlimited |
| cTrader Open API | Free |
| Historical data | Free (provided by broker) |
Revenue comes from broker licensing fees — traders pay nothing to Spotware. Your only costs are broker spreads and commissions.
cTrader vs MetaTrader vs NinjaTrader
| Feature | cTrader | MT5 | NinjaTrader |
|---|---|---|---|
| Language | C# (.NET) | MQL5 (C++-like) | C# (.NET) |
| Price | Free | Free | Free (backtesting) |
| UI | Modern, best-looking | Functional | Dated |
| Tick data | Real (broker-dependent) | Real (broker-dependent) | Tick Replay |
| Walk-forward | No | Basic forward testing | Yes (full WFA) |
| Monte Carlo | No | No | Yes |
| NuGet/.NET access | Yes | No (MQL5 only) | Yes |
| Multi-symbol backtest | Limited | Yes | Yes (basket) |
| Primary market | Forex/CFDs | Forex/multi-asset | Futures |
| Broker availability | Limited | 1,000+ brokers | NinjaTrader + IB |
Pros
- Completely free — no fees for anything
- Clean, modern UI — best-looking retail trading platform
- Full C# with NuGet support — highly extensible
- Level II pricing / depth of market as standard
- Real tick data backtesting (where broker supports it)
- Same cBot code for backtesting and live trading
- Web version available (no install needed)
- cTrader Open API for building external tools
- Active development by Spotware
Cons
- Fewer brokers than MetaTrader — limited availability
- Smaller community and ecosystem
- No walk-forward optimization
- No Monte Carlo simulation
- Limited historical data depth (broker-dependent)
- No true multi-symbol backtesting in a single test run
- Fewer third-party add-ons than MT4/MT5
- Desktop app Windows-only (web version is cross-platform)
- Documentation not as extensive as MQL5 or NinjaTrader
Who Is This For?
cTrader is ideal for forex/CFD traders who want a free, modern platform with C# scripting. If you already know C# and trade forex, cTrader Automate is arguably the cleanest API available. The main trade-off vs NinjaTrader: no walk-forward or Monte Carlo. The trade-off vs MetaTrader: fewer brokers and smaller community.