Erase Indicator Buffer values

 

Hello! My first post here :)


I just finished writing my indicator. However, I need to erase the old line which my indicator has drawn (e.g. from bar 50 to the last bar). Here is what i tried:

for (int i=LastBufferValue; i<=Bars; i++) {
   My_Buffer[i] = 0;
}

The above code does not erase the line from the screen, but just makes it vertical. Why is that?


(I also tried with My_Buffer[i] = NULL; - same thing though)


I hope you can help me out!

Thanks!

 
My_Buffer[i] = EMPTY_VALUE;
 
phy:
My_Buffer[i] = EMPTY_VALUE;

That was a quick reply! :) Thank you phy!