I'm developing an indicator. It plots trend variation line. I initially used Addplot() with transparent brush. Later on depending on bar close the brush color is set to lime and red. But the color Lime and Red I'm not able to select on Properties page while loading the indicator. Color got hard coded in the indicator. I can only change "transparent" to some other color but that too does not change the final indicator color. It remains Lime and Red only.
How can I make PlotBrush color selection available on indicator's properties page? Following is the code:-
{
'
'
AddPlot(new Stroke(Brushes.Transparent, DashStyleHelper.Solid, 2, 100), PlotStyle.Line, "Trend");
'
'
}
protected override void OnBarUpdate()
{
.
.
.
if(Close[0]<Trend[0]){
PlotBrushes[0][0] = Brushes.Red;
}
else PlotBrushes[0][0] = Brushes.Lime;
'
'
'}

Comment