Objects Destroy function - page 2

 
Daniel Cioca #: Here it is: As I have  noticed, in MT5 works,  in MT4 NOT . 

The MQL4 Standard Library has not been updated for a very long time. The equivalent MQL5 Standard Library code is more up to date.

You may need to compare the two and see what differences there are, then fix them with a custom implementation of your own.

 
Paul Anscombe #:

I can confirm your issue - I don't know why but interestingly it works as an indicator but not an EA - maybe William will enlighten me :)

I do however know of a solution/workaround. I use object pointers for such things in my products and it works fine.  here is your amended code.

Thank you.

 
Daniel Cioca #:

Thank you.

You are welcome