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)
Output printed from getplotcolor using Print():
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....
Code: Select all