cTrader Desktop Logo

Version 4.2 Release Notes

cTrader Desktop
Latest .NET Runtime

cTrader Desktop was migrated to the latest .NET 6 version. .NET 6 brings a lot of improvements and gives many new features for developers. From now on .NET runtime will be distributed with the cTrader application, using our new installer and updater. Algo developers don't need to worry anymore about the .NET runtime version on client machines.

Algos can be executed with old and new .NET

Now algos can be executed with old .NET Framework 4.x and new .NET 6. All the changes will not affect existing cBots and indicators. Old cBots and indicators will be launched in a child process running .NET Framework. New cBots and indicators that target .NET 6 will be running in different processes using .NET 6. This way cTrader keeps great backward compatibility for all existing cBots and indicators and brings the latest .NET technology for your new projects.

Algo execution moved out of process

cBots and custom indicators are now executed in different processes. This allows great backward compatibility for old cBots and indicators, better isolation of the main cTrader process, and better security from potentially malicious code. Now you will see multiple processes in the Task Manager running under the main cTrader process.

Easy upgrade from .NET Framework to .NET 6

Developers can easily update cBots and indicators to .NET 6 by switching Target in the Code Editors toolbar and build algo with the new target. If your algo contains dependencies on other libraries, it is better to make a copy and check migration on the copy first.

All IDEs and any references

We changed the way an algo file is built by removing any dependency from the cTrader application for the build process. The whole building process now takes place using .NET build tools.

This means that now you can

  • Use any IDE to work on your algos: Visual Studio, Visual Studio Code, Jetbrains Rider
  • Easily reference other libraries from NuGet which contains 250,000+ libraries
  • Integrate your algo with .NET products such as ASP.NET, WPF, WinForms, and ML.NET
  • Compile cBots and indicators using the 'dotnet build' command and even write code and compile it on Linux or Mac
Improved Intellisense and C# 10 support

Built-in Code Editor now has a new improved Intellisense with C# 10 support. You can read about the latest changes in C# language here

New installer and updater for cTrader

cTrader application is now distributed with a new installer and updater. It works better than the previous installation technology and provides a better user experience, such as the ability to launch the old cTrader version while an update is in progress.

OnDestroy method for indicators

Indicators now have an OnDestroy method that allows you to free allocated unmanaged resources and to run other finalization tasks.

Improvements for backtesting and optimization

Backtesting and optimization have been improved with multiple changes to remove any differences between them.

Optimization adds multi-symbol support for trading, price updates, and market data requests.

Debugging support

Both .NET 4.x and .NET 6 algos can be debugged in Visual Studio with real-time, silent or visual backtesting, or optimization.

New compiler settings

A compiler setting that allows selecting between embedded compiler and .NET SDK has been introduced. The embedded compiler has limited functionality but is enough for simple projects without any references. If you want to use the full power of .NET for complex projects, select .NET SDK or compile from Visual Studio, other IDEs, or using the 'dotnet build' command.

Improved Automate logs

cBot logs tab now renamed to Automate and now show combined logs for cBots and indicators

Suspended indicators due to error

A custom indicator that has an error will be suspended and will stay on the chart stopped. When an error occurs you will see a red icon on the top of the chart. From the indicators list, you can restart such an indicator or remove it.

Live progress for optimization pass

In previous versions, the optimization table showed only passes that were finished. You were not able to see passes that are in the progress.

Now such passes are displayed with real-time updates. Individual passes can now be stopped. This allows reducing the waiting time when you see that a long-running pass doesn't perform well.

Icon for an old algo file for a cBot

When an .algo file is updated on the disk for a cBot, e.g. when you rebuild it, you will see an icon showing that you are running an old version. To run the latest version you need to stop and restart it.

Auto-format code hotkey

New hotkey Ctrl + D was added to autoformat code.

Help site