I am having a performance issue on my indicator.
My indicator is supposed to draw trendlines based on certain conditions. On each bar update the last trendline is updated as long as it is "alive". (based on the original conditions). The problem I am facing is that the graph performance is greatly reduced when I add the indicator.
I'm guessing that what my code is doing is adding one new line on each bar update which is causing the issue. I'm wondering how can I edit just the last line instead of adding a new one.
Draw.Line(this,"TrendLineCont " + CurrentBar, CurrentBar - SwingHigh1Bar, High[CurrentBar - SwingHigh1Bar], 0, yn, Brushes.Magenta);
Thanks.

Comment