My indicator detects outside bars and draws a Fibonacci retracement on the most recent one. However, the Fibonacci keeps redrawing excessively and seems to be stuck in a loop. How can I ensure it only draws once per valid outside bar and updates only when a new one forms?
Also, I'm getting an Object reference not set to an instance of an object error. Could this be caused by accessing the DrawObjects collection too soon? What's the best way to handle this?
-thanks
Comment