"cAlgo.API.Colors is obsolete Use Color instead"

Created at 04 Dec 2018, 10:02
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!
sifneos4fx's avatar

sifneos4fx

Joined 15.11.2017

"cAlgo.API.Colors is obsolete Use Color instead"
04 Dec 2018, 10:02


Hello Panagiotis

Since last week, I get this Waring:

Error CS0618: 'cAlgo.API.Colors' is obsolete: 'Use Color instead.'
Error CS0618: 'cAlgo.API.Internals.Algo.ChartObjects' is obsolete: 'Use Chart instead.'

on this line:

ChartObjects.DrawHorizontalLine("Year High", YearHigh, Colors.Red, 2, LineStyle.Dots);

Changing Colors. to Color gives then this error:

Error CS1502: The best overloaded method match for 'cAlgo.API.Internals.ChartObjects.DrawHorizontalLine(string, double, cAlgo.API.Colors, double, cAlgo.API.LineStyle)' has some invalid arguments
Error CS1503: Argument 3: cannot convert from 'cAlgo.API.Color' to 'cAlgo.API.Colors'

cAlgo.API.Internals.Algo.Chart does not exists.

Is there a salad with the APIs? On the same machine, I got FXPro cTrader 3.0 an I also installed Spotware cTRader 3.3

Any suggestions?

Thank you 

Patrick

 


@sifneos4fx
Replies

PanagiotisCharalampous
04 Dec 2018, 10:21

Hi Patrick,

This happens because the two versions use a different API but it is stored in the same folder \Documents\cAlgo\API. So the application installed last will put it's API dll there and will cause trouble to the other one. In general, this in not a problem since our applications are usually updated in a short amount of time and all brokers use the same API. However in this case it takes some time for all brokers to upgrade to 3.3 and this problem occurred. A workaround for this issue is to delete the contents of this folder and restart the application you want to use.

Best Regards,

Panagiotis


@PanagiotisCharalampous

sifneos4fx
04 Dec 2018, 10:41

RE:

Great, that did the magic!

Thank you!!!!

Panagiotis Charalampous said:

Hi Patrick,

This happens because the two versions use a different API but it is stored in the same folder \Documents\cAlgo\API. So the application installed last will put it's API dll there and will cause trouble to the other one. In general, this in not a problem since our applications are usually updated in a short amount of time and all brokers use the same API. However in this case it takes some time for all brokers to upgrade to 3.3 and this problem occurred. A workaround for this issue is to delete the contents of this folder and restart the application you want to use.

Best Regards,

Panagiotis

 


@sifneos4fx