One is '2xEmas' plotted on the first panel. It uses AddPlot and OnRender to plot the Emas and the band between. The button uses the code below to make IsVisible true/false:
protected void btn_Click(object sender, RoutedEventArgs rea) { IsVisible = IsVisible == true ? false : true; ForceRefresh(); }
This is similar to my indicator posted here:
The other indicator is the MacdBB in the second panel. It does not use OnRender. The button uses the code below to make my bool paintBars true/false:
protected void btn_Click(object sender, RoutedEventArgs rea) { paintBars = paintBars == true ? false : true; ForceRefresh(); Print(paintBars); }
The paintBars code is below, simplified:
if (paintBars) { BarBrush = Brushes.Green; BarBrush.Freeze(); }
Any ideas how to fix this? I will upload to the downloads section when it's finished.
I'd prefer not to upload the entire indicator since it contains several .cs files. However if you feel it necessary I can do so.
Thank you,
Simon.
Comment