Created a basic strategy in Strategy Builder to draw a vertical line on a 5-minute chart wherever the close was higher than the open. (This was just for testing, because I haven't been able to get the vertical line to work on anything and figured I'd start out with the most basic conditions)
It draws one vertical line, on the most recent bar that meets the criteria, and that's it. Every single other drawing object will draw on every bar that meets the criteria as far back as the bars go.
What's wrong here? This is Strategy Builder syntax, unmodified:
{
if (BarsInProgress != 0)
return;
if (CurrentBars[0] < 0)
return;
// Set 1
if (Close[0] > Open[0])
{
Draw.VerticalLine(this, @"VerticalLine Vertical line_1", 0, Brushes.Lime, DashStyleHelper.Solid, 2);
}

Comment