cTrader Desktop 4.2 Has Been Released!

Created at 30 Mar 2022, 12:23
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
Spotware's avatar

Spotware

Joined 23.09.2013

cTrader Desktop 4.2 Has Been Released!
30 Mar 2022, 12:23


Dear Trader,

We are delighted to share with you the release of cTrader Desktop 4.2.

The cTrader Desktop 4.2 update betters the desktop version of cTrader with one of the biggest selections of technical improvements within several years that benefit you - our cTrader community developers.

Among other improvements, cTrader Desktop has now migrated to the latest. NET6 version, providing many new features for developer use, while maintaining the old  NET4 framework for backward compatibility with all existing cBots and indicators. 

Additionally, cTrader has altered 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, which gives you the option to use any IDE to work on your algos, from Visual Studio to Jetbrains Rider, to easily reference other libraries from NuGet, to integrate your algo with .NET products such as ASP.NET, WPF, WinForms, and ML.NET, and to compile cBots and indicators using the 'dotnet build' command and even write code and compile it on Linux or Mac.

Furthermore, there has been added improved intellisense with C# 10 support, a new installer and updater for cTrader, improvements for backtesting and optimization, debugging support, new compiler settings, improved automate logs, live progress for optimization pass, and much more, to make your experience as smooth as can be.

Download cTrader Desktop 4.2

Latest .NET Runtime

cTrader Desktop was migrated to the latest .NET 6 version, which brings a lot of improvements and gives many new features for your use. From now on .NET runtime will be distributed with the cTrader application, using our new installer and updater. As an Algo developer, you will no longer need to worry about the .NET runtime version on client machines.

Algos can be executed with old and new .NET

Now algos can be executed with both - the old .NET Framework 4.x and the new .NET 6. Please note that these changes will not affect existing cBots and indicators. Old cBots and indicators will be launched in a child process running .NET Framework, while 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 to 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

You can now 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, we suggest making a copy and checking 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 you can now:

  • 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 find out more about the latest changes in C# language here

New installer and updater for cTrader

The cTrader application now has a new installer and updater. It works better than the previous installation technology and provides a better user experience, including 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 one to free allocated unmanaged resources and 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 has been renamed to Automate and now shows combined logs for cBots and indicators.

Suspended indicators due to error

A custom indicator that has an error will be suspended and will show on the chart as 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 altogether.

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 also be stopped. This allows for reduction of waiting time when you see that a long-running pass is not performing 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 older version. To run the latest version you will need to stop and restart it.

Auto-format code hotkey

New hotkey Ctrl + D has been added to the autoformat code.

Improved API Reference

We have improved our API reference by adding grouping. You can now browse through the specialized folder groups, instead of browsing through an endless list of types. Discover the full power of Automate API in a structured and much convenient way!

 Download cTrader Desktop 4.2

If you wish to discuss the updates, or ask any follow-up questions, please join cTrader Telegram & cTrader Facebook groups. 

 


@Spotware
Replies

sirinath
04 Apr 2022, 13:30

RE:

Open in Visual Studio does not recognise VS2022.


@sirinath

sirinath
04 Apr 2022, 13:56

RE:

All my old Robots and Indicators do not open now. It says source code not found when the source code, algo file and solution is in fact there.


@sirinath

crou
04 Apr 2022, 14:49

Hi, can you reveal when is it going to be released with ICMarkets? Thanks.


@crou

PanagiotisCharalampous
04 Apr 2022, 16:33

Hi sirinath,

Please create a separate thread and provide some more information about your issues please like screenshots and steps to reproduce.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
04 Apr 2022, 16:34

Hi crou,

We do not have a specific date at the moment since we are still testing the platform.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

sirinath
06 Apr 2022, 19:45

RE:

PanagiotisCharalampous said:

Hi sirinath,

Please create a separate thread and provide some more information about your issues please like screenshots and steps to reproduce.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

Done


@sirinath

svenissimo
08 Apr 2022, 12:50

Wow... well done.

Quite an achievement cDev team.  I can only imagine how long its been bubbling on.. great stuff.

 


@svenissimo

amml
17 Apr 2022, 19:54

Awesome!

That's great news. Looking forward to testing v4.2 in the coming days.

Thanks a lot for the nice tech you guys are developing.

 


@amml

ctid2514471
05 Jun 2022, 18:05

Any Australian brokers yet?

Are any Australian brokers offering Desktop 4.2 as yet?
The Australian brokers just say "We offer cTrader" - But they don't specify which version.

The improvements here sound awesome, as a few of the improvements address issues that made me give up on my algorithmic trading ideas.


@ctid2514471

amusleh
06 Jun 2022, 08:21

RE: Any Australian brokers yet?

ctid2514471 said:

Are any Australian brokers offering Desktop 4.2 as yet?
The Australian brokers just say "We offer cTrader" - But they don't specify which version.

The improvements here sound awesome, as a few of the improvements address issues that made me give up on my algorithmic trading ideas.

Hi,

All cTrader brokers will be updated to latest version eventually, we are rolling out version 4.2 slowly for all brokers.

 


@amusleh

ctid4797769
16 Jun 2022, 11:24

RE: RE: Any Australian brokers yet?

amusleh said:

ctid2514471 said:

Are any Australian brokers offering Desktop 4.2 as yet?
The Australian brokers just say "We offer cTrader" - But they don't specify which version.

The improvements here sound awesome, as a few of the improvements address issues that made me give up on my algorithmic trading ideas.

Hi,

All cTrader brokers will be updated to latest version eventually, we are rolling out version 4.2 slowly for all brokers.

 

Do we know who will be the first and a more specific when? There are key features we have been waiting for so I think everybody want to move :-)


@ctid4797769

amusleh
17 Jun 2022, 10:58

RE: RE: RE: Any Australian brokers yet?

ctid4797769 said:

amusleh said:

ctid2514471 said:

Are any Australian brokers offering Desktop 4.2 as yet?
The Australian brokers just say "We offer cTrader" - But they don't specify which version.

The improvements here sound awesome, as a few of the improvements address issues that made me give up on my algorithmic trading ideas.

Hi,

All cTrader brokers will be updated to latest version eventually, we are rolling out version 4.2 slowly for all brokers.

 

Do we know who will be the first and a more specific when? There are key features we have been waiting for so I think everybody want to move :-)

Hi,

We can't give you any ETA, we already released version 4.2 for some brokers, it will be released for other brokers in near future.


@amusleh

firemyst
29 Jul 2022, 03:02 ( Updated at: 21 Dec 2023, 09:22 )

Issue with cTrader 4.2 attaching to processes for debugging

Hi @Spotware  / @Panagiotis:

These are some great features and additions.

However, there's one that as an annoying drawback. Let's say you have at least 3-5 tabs open with trading charts with custom indicators. Now you have Visual Studio open trying to debug one of those indicators. You want to attach Visual Studio to the process.

How do you know which one to attach to?

Here you can see that there's at least 10 algohost processes launched, none of which have a title.

How does anyone know what process to attach the specific code they're debugging to from IDE's like Visual Studio?

I have to attach to the first one. Are breakpoints hit? No? Ok, I have to try the second one. Are breakpoints hit now? No? I have to try attaching to the next process. And so on and so forth.

Is there any way to make this a bit easier for developers? Like, can't @Spotware include a "Title" (or some other identifying information) when the separate algohost processes are spawned?

Thank you.


@firemyst

swingfish
29 Jul 2022, 05:05

RE:

Spotware said:

one of the biggest selections of technical improvements within several years that benefit you - our cTrader community developers.

great, lot's of new things, including breaking basic charting functionality as it is now impossible to place/maintain or manage simple trendlines.

which in essence, makes trading simply impossible.

 


@swingfish

PanagiotisCharalampous
01 Aug 2022, 14:22

Hi firemyst,

There is a new debugging process documented here.

Hi swingfish,

We would appreciate some more information that would allow us to reprduce and resolve these issues.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook 


@PanagiotisCharalampous

firemyst
02 Aug 2022, 03:12

RE:

PanagiotisCharalampous said:

Hi firemyst,

There is a new debugging process documented here.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook 

Thank you @PanagiotisCharalampous!

The above worked for me using Visual Studio 2017.


@firemyst

ctid1220407
02 Aug 2022, 16:49 ( Updated at: 21 Dec 2023, 09:22 )

Backesting Issue with new version

Hi Team,

Previously after a backtest you could clilck on a trade in the Equity tab and it would locate the trade on the chart. This does not seem to work anymore?


@ctid1220407

Tradius
04 Aug 2022, 18:23

Bugs on range chart

Good morning, since I downloaded version 4.2 all my strategy does repaint, I use atr in my methods and if you try to put atr on range charts you see the repaint, can you fix it?


@Tradius

PanagiotisCharalampous
05 Aug 2022, 08:16

Hi Tradius,

Please create a separate thread, provide us with exact steps to reproduce this problem and we will hae a look.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

 


@PanagiotisCharalampous

alexsanramon
08 Sep 2022, 00:45

This the worst update really. I cannot draw trendlines. Cannot even draw anything.


@alexsanramon

RayAdam
18 Sep 2022, 23:18 ( Updated at: 21 Dec 2023, 09:22 )

RE:

Trading Session is buggy in this update;

Trading Session showing Wellington although Market has not started yet at start of the week.

 


@RayAdam

PanagiotisCharalampous
19 Sep 2022, 12:49

Hi RayAdam,

These two fields are not related. The trading sessions are global and they are a different thing to the symbol's market trading hours.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

hieunguyen16202
06 Apr 2024, 07:11 ( Updated at: 07 Apr 2024, 05:23 )

RE: RE:
sirinath said:

Open in Visual Studio does not recognise VS2022.


@hieunguyen16202

hieunguyen16202
06 Apr 2024, 07:12 ( Updated at: 07 Apr 2024, 05:23 )

src/libraries/System.Private.CoreLib/src/System/Object.cs


@hieunguyen16202

PanagiotisCharalampous
07 Apr 2024, 06:01

RE: RE: RE:

hieunguyen16202 said: 

sirinath said: 

Open in Visual Studio does not recognise VS2022.

 

Hi there,

Can you be more specific about this problem?

Best regards,

Panagiotis


@PanagiotisCharalampous