The New LineColor Output Attribute

Created at 21 Feb 2019, 18:43
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!
lec0456's avatar

lec0456

Joined 14.11.2012

The New LineColor Output Attribute
21 Feb 2019, 18:43


As I update my indicators to use the new API I notice that the new line color attribute does not acccept the enumerations from the color class.if i use the following:

[Output("SMA", LineColor = Color.Red)]

I get the following Error:

Error CS0030: Cannot convert type 'cAlgo.API.Color' to 'string'

 

I wants me to use a hexadecimal string to assign the color, like "#FFFF0000"  But is a pain to remember. Is there another way to assign the colors without having to memorize the hexadecimal codes?


@lec0456
Replies

PanagiotisCharalampous
22 Feb 2019, 09:40

Hi lec0456,

You can also use strings, like LineColor = "Red"

Best Regards,

Panagiotis


@PanagiotisCharalampous