DrawLine("stop" + CurrentBar, false, fillBar, pStop.StopPrice, CurrentBar, pStop.StopPrice ,Color.Blue,DashStyle.DashDotDot,3);
it is in OnBarUpdate for min bars and is drawn when their is a position. I expect the line to appear from the bar when the system has a position to when it no longer has a position:-
if(Position.MarketPosition != MarketPosition.Flat)
{
DrawLine("stop" + CurrentBar, false, fillBar, pStop.StopPrice, CurrentBar, pStop.StopPrice ,Color.Blue,DashStyle.DashDotDot,3);
}
However when I apply it to a chart the lines are plotted right at the begining of the chart.
What am I missing?

Comment