What i wanted to ask was - i save the calculated values then plot and ema of the saved series of values and this is plotted in onbarupdate using the
AddPlot(new Stroke(Brushes.Red, 2), PlotStyle.Line, "Correlation");
So when i add the indicator to the chart i am adding to the same panel as price and on the left. I have set autoscale to both false and true in my tests and doesnt seem to make difference.
The problem is initially the scaling looks fine .. showing the values on the scale relevant to the actual values in the visible chart range - then periodically the scale adjust to include
the entire range for the loaded chart - this has the effect of flatlining the line plot since it is scaling to the range for all the plots since the first bar and not just the values in the range.
Is there something i am missing or need to do here when using the plot set in onbarupdate?
I have other code that uses Onrender in other indicators which draws based on the values in the visible screen range.
What is it that is affecting the scale to go from the actual range for bars in visible chart to then the entire scale since the first bar?
thanks
Comment