However as I am using 300 ticks chart, there is no way I can determine the length of today's chart ( as in the number of candles within the day's trade session).
But for the DrawLine function it draws a fixed length. When the number of candles exceed this line line, the line will not readjust or auto extend.
Is there anyway to fix this?
The codeI am using is:
DateTime NextDay = Time[0].Add(tsOneDay);
DateTime StartTime = new DateTime(Time[0].Year, Time[0].Month,Time[0].Day,6,0,0);
DateTime EndTime = new DateTime(NextDay.Year, NextDay.Month, NextDay.Day,5,0,0);
DrawLine(cirrentbar.tostring(), false, StartTime , High[0], EndTime, High[0],Color.Aquamarine,DashStyle.DashDotDot, 2);
Thanks
Comment