PlotBrushes[0][x] exists and is the brush/color that has been overridden on that same plot, x bars back.
The problem with this is if you have lots of plots, or if you copy/paste a code block in from another indicator that has let's say plots 0..10, and now the plots need to be renumbered to indices 11..21... so you end up having to do busywork to fix all this.
Typically, there are named properties such as MyPlot that alias to Plots[0] so you don't type Plots[0] in the code, you type MyPlot.
Suggestion: there should be a property Plots[0].PlotBrushes[x] which provides access to the PlotBrushes[] array for the right plot - this way you can do MyPlot.PlotBrushes[x] directly without knowing which index the plot is.
That would save a good bit of "refactoring" time when developers are doing a task like combining all the functionality from two indicators into one and they have to fix all the PlotBrushes[index] references.
Comment