Errors, bugs, questions - page 1984

 
Aleksey Vyazmikin:

Shouldn't the buffer disappear after the indicator disappears?

However, maybe the calculations need to be de-initialised somehow, but how?

Is it removed from the code?

 
Alexey Viktorov:

Has it been removed from the code?


It was only declared in the code, but no calculations were done.

 

Removed mentions from the code altogether - the buffers are gone.

 
Alexey Viktorov:

That's the way it's meant to be. Cleanliness of the array and/ or indicator buffer is programmer's concern.

By the way, there is still a flaw there. If there is dynamic setting of the number of graph series (at user's choice), even if the buffers are initialized with empty values in OnDeinit(), they are still visible at restart of the indicator.

I.e., if indicator_plots is more than the number of used graph series, the rubbish can remain on the screen (in the case, when all graph series have been involved first, and then some of them are no longer involved).

 
Alexey Kozitsyn:

By the way, there is still a flaw there. If there is dynamic setting of the number of graph series (at user's choice), even if the buffers are initialized with empty values in OnDeinit(), they are still visible at restart of the indicator.

I.e., if indicator_plots exceeds the number of used plots (graph series), the rubbish can remain on the screen (in the case, when all graph series are involved first, and then some are no longer involved).

Which is what happens with our namesake. But that's solved on a "one off", isn't it? If the plots are no longer needed, they must either be deleted or filled in at each bar with a non-display value.

I'm not very well versed in hardware, but I suspect it has to do with clearing the memory address of the computer. And probably due to this, among other things, increases the speed of MT.

 
Alexey Viktorov:

Which is the case with our namesake. But this can be solved at once, can't it? If the plots are no longer needed, it must either be deleted, or at each bar it must be filled with a value that is not displayed.

I'm not strong in hardware, but I suspect that it has to do with clearing of memory address. And probably due to this, among other things, MT speed increases.

I don't know about him, but I couldn't solve this problem. It's supposed to be simpler than that. Come deinitialisation time, took it and zeroed out all the buffers. Just all the buffers in use. Ideally, it should help. However, you get the following picture.

The case of using all graph series:

And this is what happens when you disable the arrow display (via the input parameters):


And no matter what clearing is set in OnDeinit() - rubbish remains.

 
Alexey Kozitsyn:

I don't know about him, but I haven't been able to solve this problem.

I will assemble a test indicator later and send it to the SD.
 
Alexey Kozitsyn:
I'll assemble a test indicator later and send it to the SD.

Wise decision!

And I was told it should be, so I've already rewritten and rubbed it all in...

 
Alexey Kozitsyn:

I don't know about him, but I haven't been able to solve this problem. It's supposed to be simple. The moment of deinitialisation came, I took all the buffers and reset them to zero. Just all the buffers in use. Ideally, it should help. However, you get the following picture.

The case of using all graph series:

And here's what happens when you disable the arrow display (via the input parameters):


And whatever clearing is set in OnDeinit() - rubbish remains.

Alexey, an immodest question, is PLOT_EMPTY_VALUE prescribed?

 
Alexey Viktorov:

Alexei, and immodest question, is PLOT_EMPTY_VALUE prescribed?

Yes, of course it is.
Reason: