Changing from Colors to Color in Code
Changing from Colors to Color in Code
03 Nov 2024, 05:19
Hello
I am new to cTrader and it's coding techniques. I am trying to change the below code as Colors seem to be obsolete. However, I receive the below error. What does it mean? How can I fix it?

Replies
bunglingbunny
05 Nov 2024, 10:58
( Updated at: 05 Nov 2024, 11:20 )
RE: Changing from Colors to Color in Code
PanagiotisCharalampous said:
Hi there,
You should use a string e.g. “Red”, to define a default color.
Best regards,
Panagiotis
Thanks. Is it possible to show an example in couple of lines of code as to how the existing code should be changed? That will be a great help.
@bunglingbunny
toolsche
21 Feb 2025, 15:15
RE: RE: Changing from Colors to Color in Code
bunglingbunny said:
PanagiotisCharalampous said:
Hi there,
You should use a string e.g. “Red”, to define a default color.
Best regards,
Panagiotis
Thanks. Is it possible to show an example in couple of lines of code as to how the existing code should be changed? That will be a great help.

@toolsche
amusleh
21 Feb 2025, 18:00
( Updated at: 21 Feb 2025, 18:01 )
You can use Color parameter type instead of string: https://help.ctrader.com/ctrader-algo/guides/trading/?h=color#working-with-colors
@amusleh
PanagiotisCharalampous
04 Nov 2024, 07:13
Hi there,
You should use a string e.g. “Red”, to define a default color.
Best regards,
Panagiotis
@PanagiotisCharalampous