Colours

Created at 05 Feb 2014, 15:41
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!
EL

Elogos

Joined 23.01.2014

Colours
05 Feb 2014, 15:41


Good Afternoon,

I read in documentation that the enum "Colors" is equivalent to that found in System.Drawing.Color

However I have two issues with the way that colors are handled.

 

Firstly, there are not named versions of the colours found in the cTrader palette, at least some are missing.

Secondly I can get the true colour values of this palette, however there isn't any way to use the System.Drawing.Color struct to parse these values into something the API can consume.

 

Is there any way for the API to consume System.Drawing.Color or a way to parse hex string or RGB values?

The solution doesn't have to be an internal of Spotware, I welcome anything really.


@Elogos
Replies

Spotware
05 Feb 2014, 15:46

You can not use hex or RGB values. It is only possible to use predefined colors.


@Spotware

Elogos
05 Feb 2014, 16:40

Is it even possible to get the colours from your palette inside cTrader since they don't exist as named?

Additionally, creating candles from lines is an issue since there isn't a parameter type for "Colors" nor can you get "Colors" from an output type attribute that could be used in the drawline method.

So people can't change the colours of a set of candle replacements using an indicator without source code.

 

Any suggestions?


@Elogos

Spotware
06 Feb 2014, 12:36

If you want to expose colors as parameters you can use workaround:

/forum/calgo-reference-samples/2235


@Spotware