I have a script that is supposed to draw some lines, the lines are visible in the drawing objects list, the prints are showing, but they do not appear on the chart.
The code is below and I can't figure out why this is happening, as other parts of the script with identical syntax are drawing the lines correctly.
if (Slope(Highs[0], 5, 0) > 0 && Slope (DMI1, 5, 0) < 0)
{
Print ("CB Consec Neg Div = " + CurrentBar + "\n ");
Draw.Line(this, "Consec Neg Div " + " / P S " + (CurrentBar - 5) + " / P E " + CurrentBar,
true, CurrentBar - 5, Highs[0][5], CurrentBar, Highs[0][0], Brushes.Yellow, divDashStyle, 1, true);
Draw.Line(this, "Consec DMI Neg Div " + " / Dmi S " + (CurrentBar - 5) + " / Dmi E " + CurrentBar,
true, CurrentBar - 5, DMI1[5], CurrentBar, DMI1[0], Brushes.Yellow, divDashStyle, 1, false);
}

Comment