I am using a variable: DateTime Start; to draw a line through an indicator. When I use the same variable to draw a rectangle, I get this error message and I don't understand why: Indicator 'MyIndicator': Error on calling 'OnBarUpdate' method on bar 0: "NinjaTrader.NinjaScript.DrawingTools.Rectangl e startTime must be greater than the minimum Date but was 01/01/0001 00:00:00".
Here is the syntax:
Draw.Line(this, "MyLine ", false, Start, Price1, End, Price1, IsGlobal, template);
Draw.Rectangle(this, "Myrectangle ", Start, Price1, End, Price2, IsGlobal, template);
Thank you
Comment