I am currently creating drawing tool line for my strategy but I am getting error for below statement. This is a click button event.
startTime and endTime in the startAnchor and endAnchor value is {1/1/1800 12:00:00 AM}. Kindly help to fix this issue. Thanks.
if (DrawObjects["LineSell"] as DrawingTools.Line != null)
RemoveDrawObject("LineSell");
DrawingTools.Line mySellLine = Draw.Line(this, "LineSell", false, 20, Close[0], 0, Close[0], Brushes.Salmon, DashStyleHelper.Solid, 2);
Or
DrawingTools.Line mySellLine = Draw.Line(this, "LineSell", false, 20, Close[0], 0, Close[0], true, "");
Comment