GetPlotColor() returns defaults, not user settings...

Questions about MultiCharts and user contributed studies.
damageboy
Posts: 70
Joined: 15 Sep 2006
Been thanked: 15 times

GetPlotColor() returns defaults, not user settings...

Postby damageboy » 10 Nov 2006

Hi,
I'm trying to use:
GetPlotColor() to retrieve the user set plot color for a certain plot in my indicator.

I'm noticing that: regardless of WHAT color was set for the plot in the study format dialog, the GetPlotColor() returns the default color used by MC in the first time the study was added...

Moreover, the indicator isn't even re-run (!) when I update the colors. So, in theory, if the color is changed, the indicator code does not run, detect the change... and update the chart accordingly :(

I'm guessing this is some sort of optimization, done by MC, where MC changes the plot colors of the affected plots without re-running the indicator, however this leads to undesirable effects in this case.

Also, while on the same subject, I would like the MC team to add an additional function: GetPlotStyle, so that I could detect the type of plot configured for a plot (i.e.: Tool_Solid, Tool_Dashed, Tool_Dotted, Tool_Dashed2, Tool_Dashed3)

Example:
Indicator preferences:
Image

Output printed from getplotcolor using Print():

Code: Select all

Plot1Color= 0.00
Plot2Color= 0.00
Plot3Color=65535.00
Plot4Color=65535.00
Plot5Color=16711935.00
Plot6Color=65280.0
As you can clearly see, for example, Plot1 and Plot2 are retrieved as black (0.0), while in the preferences they were set to DarkGreen and DarkRed....
Attachments
getplotcolor-messup.png
(54.91 KiB) Downloaded 428 times

Return to “MultiCharts”