I am drawing a regression channel on a chart which uses the ninzarenko bar type.
The issue I am experiencing is that once you have drawn the channel, if the channel is longer than the bars currently displayed, the regressionchannel recalculates itself based on the bars on the chart, not the length of the channel and moves around the screen. This can also cause ninjatrader to lock up.
Should not the regression channel be static once drawn? I'm surprised the channel is redrawing itself, even when new bars are being created, simply by scrolling back through the chart.
Would this be expected?
The statement I use to plot the channel is as follows
Draw.RegressionChannel(this, "lrc3", false, i, 0, LineColour, DashStyleHelper.Dash, 3, LineColour, DashStyleHelper.Dash, 1,LineColour, DashStyleHelper.Dash, 3);
If you then use the chart scroll bar to scroll left, even when no new data is being received, the channel recalculates itself and jumps all over the screen once the right of the channel scrolls off the right. I would add, the channel is longer than the bars that are displayed on the chart.
Perhaps this is related to the bar type and the way it is implemented?
Any suggestions to keep the channel static?
[edit] - just to add. If the line type is .Dash, scrolling will cause NT to lock up, or freeze for many seconds. If the line type is .Solid, the channel still jumps all over the place, but the lock up does not occur.
Comment