Skip to content

Troubleshooting

This article explains how to resolve issues you may encounter when using cTrader CLI.

Command not found

If your terminal reports that ctrader-cli is not recognised, the command is not on your PATH.

  • Close and reopen the terminal so that it picks up a recently updated PATH.
  • On Windows, confirm that the folder containing ctrader-cli is on your PATH. Adding the folder manually fixes this if it is not.
  • If you installed with a package manager, reinstall and confirm that the installation completed without errors.

Common command errors

Message or symptom Solution
Unhandled exception or invalid usage Check the command for mistakes. Remove unknown commands, options or arguments and correct the syntax.
cTrader CLI does not support older .NET cBots Recompile the cBot for modern .NET in the latest cTrader desktop application, then use the new file.
Connection cannot be established Check the internet connection on the machine that runs cTrader CLI.
Invalid cTrader ID credentials Check the cTrader ID email or username, and confirm that the password file contains the correct password with no extra spaces.
Account cannot be found Run accounts to list the trading accounts linked to your cTrader ID, then use the correct number.
Unknown symbol name Run symbols to list available symbols, then use the correct symbol.
Unknown period Run periods to list available periods, then use the correct token.
Ambiguous account number Add --broker to specify the broker associated with the account.
Additional access rights are required Add --full-access to run the cBot without access-right restrictions.
Invalid .cbotset file format Regenerate the .cbotset file in the latest cTrader desktop application.

Backtesting and optimisation

Message or symptom Solution
No historical data for the specified period Provide a data file for the period with --data-file, or choose a period that has data.
Stop out during a backtest Adjust the cBot parameters or improve the strategy to avoid margin calls.
Invalid settings Check the backtest or optimisation options and correct any mistakes.
Optimisation appears to pause When you optimise a symbol parameter, the engine downloads data for each new symbol on the first run. The run continues once the data is cached.