"GetPlotColor" ALWAYS returns the DEFAULT color of the Indicator.
If the color of a plot is changed in a chart from the default color,
"GetPlotColor" still returns the default color.
GetPlotColor Bug
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
Hi Gann_Mann,
GetPlotColor returns either the Default colour or a colour determined by the function SetPlotColor.
When you are saying: "If the color of a plot is changed in a chart from the default color, "GetPlotColor" still returns the default color." are you talking about changing the color with SetPlotColor?
Thank you.
GetPlotColor returns either the Default colour or a colour determined by the function SetPlotColor.
When you are saying: "If the color of a plot is changed in a chart from the default color, "GetPlotColor" still returns the default color." are you talking about changing the color with SetPlotColor?
Thank you.
-
- Posts: 85
- Joined: 01 Jul 2007
- Location: Missouri
- Has thanked: 7 times
- Been thanked: 2 times
Hi Marinaa,Hi Gann_Mann,
GetPlotColor returns either the Default colour or a colour determined by the function SetPlotColor.
When you are saying: "If the color of a plot is changed in a chart from the default color, "GetPlotColor" still returns the default color." are you talking about changing the color with SetPlotColor?
Thank you.
No, I'm not talking about changing the color with SetPlotColor (within the code).
I want to change the color (outside code) on individual charts using 'Format Study'.
I'm drawing trendlines (within code) and want those trendlines to be the same colors
as Plot1, Plot2, Plot3, etc. These plot colors are different for each chart.
TL_SetColor(1, GetPlotColor(1));
TL_SetColor(2, GetPlotColor(2));
TL_SetColor(3, GetPlotColor(3));
I would think 'GetPlotColor' should return the color of plots on a per chart basis.
Thank you.
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
-
- Posts: 85
- Joined: 01 Jul 2007
- Location: Missouri
- Has thanked: 7 times
- Been thanked: 2 times
Marina,Hi Gann_Mann,
It doesn't return this value on a per chart value.
This is an excerpt from our help: "GetPlotColor returns either the Default colour or a colour determined by the function SetPlotColor. "
This is how this reserved word is supposed to work.
FYI, this breaks compatibility with TS EasyLanguage.
GetPlotColor in EasyLanguage returns the color of plots on a per chart basis.
Thank you.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
-
- Posts: 85
- Joined: 01 Jul 2007
- Location: Missouri
- Has thanked: 7 times
- Been thanked: 2 times
This is what I mean by "Per Chart basis":I don't understand what you mean by "Per Chart basis".
Chart Window #1 - plot1 color = red
Chart Window #2 - plot1 color = green
Chart Window #3 - plot1 color = blue
The "Default Color" for the plots of an indicator are SET in the PowerLanguage Editor under:
File--->Properties... (General Tab).
Only 1 "Default Color" is allowed for each plot of an indicator.
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
-
- Posts: 85
- Joined: 01 Jul 2007
- Location: Missouri
- Has thanked: 7 times
- Been thanked: 2 times
The behavior of GetPlotColor has not changed and remains incompatible with TS code.Hi Gann_Mann,
In the gold release, the behavior of GetPlotColour in MC will be made the same as the behavior of this function in TS.
Regards.
GetPlotColor needs to return (get) the plot colors for each individual chart window, not the default plot colors as set in PowerLanguage file properties.
- Andrew Kirillov
- Posts: 1589
- Joined: 28 Jul 2005
- Has thanked: 2 times
- Been thanked: 31 times
- Contact:
- Andrew Kirillov
- Posts: 1589
- Joined: 28 Jul 2005
- Has thanked: 2 times
- Been thanked: 31 times
- Contact: