I have an Indicator that plots a dot when there is a condition, after that another condition is checked and I want to hide the previous dot if the second condition is false.
The code is this:
protected override void OnStateChange() { ... AddPlot(new Stroke(Brushes.LimeGreen, 2), PlotStyle.Dot, "SistUp"); // That's the plot ... } protected override void OnBarUpdate() { ... if (Close[1]==Close[3]) // First Condition { SistU = true; Values[0][0] = ((Low[0])*(0.9995)); //The green dot is plotted under the current candle } else { SistU = false; } ... if (SistU == true) { if (High[1]>= High[3]) // 2nd Condition { CandleOutlineBrush = Brushes.Lime; // Change the current candle outline colour to lime } else // If the 2nd Condition is false I want to delete/hide the green dot { PlotBrushes[0][0] = Brushes.Transparent;// I'll try this, but it doesn't run } }
Thanks
Comment