Newbie question: how to get chart foreground color

 

Hi all,

How can I get the foreground color of a chart? I want to display text in foreground color but could not find a way to get that color.

thanks in advance

 
You could probably use a variation of this: https://www.mql5.com/en/forum/106857
 
RaptorUK:
You could probably use a variation of this: https://www.mql5.com/en/forum/106857


Thanks but I do not think it would work for foreground color. The method described picks the color of pixel 1,2 of the chart as the background color. How can I know which pixel has the foreground color?

The foreground color is certainly available somewhere. I have an indicator for "time for next candle" that uses the foreground color to display the text.

 
Vitalhb:


Thanks but I do not think it would work for foreground color. The method described picks the color of pixel 1,2 of the chart as the background color. How can I know which pixel has the foreground color?

The foreground color is certainly available somewhere. I have an indicator for "time for next candle" that uses the foreground color to display the text.

Take a screen grab, open the screen grab in MSPaint, count the pixels . . .
Reason: