Bug in arrow indicators

 

Why most indicators that I put in graph stay with aleatory arrows when I alter symbol and change the timeframe in same window? Its any garbage that going accumulating in the buffers?

Can you explain why it ocurrer? and what I can do to solve it?

Thanks!


Sample:

Sample

 
Jomar Ferreira: Its any garbage that going accumulating in the buffers?

Yes. Set your buffer(s) element to empty value at the top of the loop.

 
Hi William, thanks for answer. So just put "ArrayInitialize", but in which function ? OnCalculate or OnInit?
 
I didn't say anything about using AI. If you set an arrow on bar zero and later it should not be there, you have to remove it.
 
Jomar Ferreira :

Why most indicators that I put in graph stay with aleatory arrows when I alter symbol and change the timeframe in same window? Its any garbage that going accumulating in the buffers?

Can you explain why it ocurrer? and what I can do to solve it?

Thanks!


Sample:


This behavior indicates errors in your programming. When you write an indicator, you are obliged to force recalculation of your indicator buffers when downloading history or at the first start.

Reason: