The issue may be with the line being drawn. Current for the end point of the line you are using conditionBar-CurrentBar. This would likely end up being a negative number and would plot the line forward however many bars forward that it should actually be backward.
Try changing this:
DrawLine("Gap" + CurrentBar, false, 2, Low[conditionBar], conditionBar - CurrentBar, Low[conditionBar], Color.DarkRed, DashStyle.Dot, 1);
To:
DrawLine("Gap" + CurrentBar, false, 2, Low[conditionBar], CurrentBar-conditionBar, Low[conditionBar], Color.DarkRed, DashStyle.Dot, 1);
Comment