Indicator problem

 

Hi

 I have coded an indicator which draws arrows and lines and it works. The problem is that when I scroll the chart to the outermost left part of the chart the arrows get distorted and appear in incorrect places.

When I keep scrolling in that direction the chart timeline extends and older dates as well as older bars appear. - older history is created?

I wrote a line which prints me the numer of counted bars (Indicatorcounted) in the terminal. When the above problem occurs the numer of counted bars goes down to zero which forces the indicator to

recalculate. 

Thanks for help

 
John_70:

I have coded an indicator which draws arrows and lines and it works. The problem is that when I scroll the chart to the outermost left part of the chart the arrows get distorted and appear in incorrect places.

When I keep scrolling in that direction the chart timeline extends and older dates as well as older bars appear. - older history is created?

I wrote a line which prints me the numer of counted bars (Indicatorcounted) in the terminal. When the above problem occurs the numer of counted bars goes down to zero which forces the indicator to recalculate. 

Thanks for help

  1. So it does NOT work correctly. Fix it.
  2. Older history is downloaded.
  3. New bars, indicator must recalculate
  4. Welcome
 

"Problem" solved. it works ok when not downloading history. I reduced max numer of bars on the chart.

I shouldn't have called that a problem. 

Reason: