I'm just learning so bear with me and if I'm headed in the wrong direction let me know.
I'm trying to draw a rectangle ever 30min that encompasses the candles in that 30min range. I would like to see a rectangle at 7:00 which goes till 7:30 at which a new rectangle is drawn and so on.
I've got code that is using OnBarUpdate() and I can successfully draw a dot every 30 minutes using the following which seems to be working great.
if(Time[0].Minute % 30 == 0)
{
Draw.Dot(this, "YourDot"+CurrentBar, true, 0, Low[0] - TickSize, Brushes.Red);
}
I've read that drawing rectangles can take a startTime and an endTime. I just don't understand how to get those values into the drawing code:
Draw.Rectangle(this, tagA, startTime, maxLow, endTime, maxHigh, Brushes.Cyan);
Any hints, suggestions or guidance would be welcome and thank you in advance.

Comment