If I am drawing a line with the code below, when I remove it do I have to set the Brush to null? The issue that gives is that, after the first Line is removed, the next ones are being drawn with the default colour and dash style, rather than the brushes I set in my indicator.
I'm getting a compile error of DashStyleHelper not being a nullable value when I try to remove also the Dash Style - do I not have to remove that as well?
Do I have to set the Line to null as well even if it is not created as an object (i.e. Line myLine = Draw.Line(...)...Remove....myLine = null), or do I have to create as objects the Lines I plan to Remove later on?
Thank you
Draw.Line(this, "negDiv 1 " + " / P S " + LastHSwDMIpriceBar[j - 1] + " / P E " + PriceHighBar[b - 1] + " / D S " + LastHSwDMIbar[j - 1] + " / D E " + HSwDMIbar[b - 1], true, CurrentBar - LastHSwDMIpriceBar[j - 1], LastHSwDMIprice[j - 1], CurrentBar - PriceHighBar[b - 1], HSwDMIprice[b - 1], negDivColour, divDashStyle, 1, true); .... RemoveDrawObject("negDiv 1 " + " / P S " + LastHSwDMIpriceBar[j - 1] + " / P E " + PriceHighBar[b - 1] + " / D S " + LastHSwDMIbar[j - 1] + " / D E " + HSwDMIbar[b - 1]); negDivColour = null; // divDashStyle = null;
Comment