I am trying to draw lines that paint from the previous bar to the current bar, but they always paint from 2 barsAgo to 1 barsAgo.
My indicator "Displacement" is set to 0.
I have verified that the code is positioned in OnBarUpdate() within the braces where activeBar is equal to CurrentBar.
It is acting as though the code is sitting inside the code area where (CurrentBar != activeBar), but it is not located there.
Any advice will be greatly appreciated.
protected override void OnBarUpdate()
{
if (CurrentBar != activeBar)
{
activeBar = CurrentBar;
}
if(BidVolume0 >= bidHighLevel) {Draw.Line(this, "bidTag0" + CurrentBar, false, 1, bidPrice0, 0, bidPrice0, Brushes.LightSeaGreen, DashStyleHelper.Solid, lineWidth, true); }
}
Comment