My indicator flickers when chart is zoomed or height is adjusted

 

My indicator flickers when chart is zoomed or height is adjusted

I am wondering what actions are called when chart is zoomed in / out or its height is adjusted?

Does it call OnInit?

 
Place a Print() in you code (OnInit, OnCalculate()) to see what happens
 
Carl Schreiber #:
Place a Print() in you code (OnInit, OnCalculate()) to see what happens

thank you for reply, I found it was conflict with another indicator and thread issue, fixed it