How come ObjectFind returns error 4202 (OBJECT DOES NOT EXIST)?

 

Is it just me and my environment, or is this a general 'problem'? I would not have expected such an ERROR from a call to determine if an object exists.  Yes, I can reset the error after every call, but why should that be necessary?

There seems to be a similar issue with call to GlobalVariableCheck.  MQL4 does not appear to have these problems.

 

Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the file.
     How To Ask Questions The Smart Way. (2004)
          Be precise and informative about your problem

We can't see your broken code.

 
Hi guys, I am also getting error 4202 that couse mt5 chart frezze for minute and then everything on chart is acting strange.
Same code on mt4 works with no problem.
Looks like mt5 have some problems with accesing object properties and error is random.
 
I suspect an internal semaphore problem when syncing the chart objects.

The process of creating and accessing a chart object are bound to a thread sync, that's why creating an object will only send a request to the terminal, not actually create the object.

Maybe when introducing a sleep in between the calls to object create and object find, you might step over the above mentioned issues.


 
The point I was trying to make [ perhaps a little too subtly ] is that a 'NOT FOUND' return from a call to find something is actually a legitimate and possibly anticipated RESULT rather than an ERROR.  If for whatever reason the result cannot be determined, then that should be indicated by the error status. 
 
Igor Zizek #:
Hi guys, I am also getting error 4202 that couse mt5 chart frezze for minute and then everything on chart is acting strange.
Same code on mt4 works with no problem.
Looks like mt5 have some problems with accesing object properties and error is random.

I agree.. there is a problem and it seems random. The ObjectFind function throws an error, but the object exists.

The tick reception of the symbol also stops, almost the same codes do not cause any problems in mt4. I've been trying to fix this problem for days

ObjectFind() sometimes can't find the object and the error it sends is not 4200 but in the error check it comes 4000 (as if it was a number that has already occurred) then the graphic freezes

 
Mustafa Damgaci #:

I agree.. there is a problem and it seems random. The ObjectFind function throws an error, but the object exists.

The tick reception of the symbol also stops, almost the same codes do not cause any problems in mt4. I've been trying to fix this problem for days

ObjectFind() sometimes can't find the object and the error it sends is not 4200 but in the error check it comes 4000 (as if it was a number that has already occurred) then the graphic freezes

Any update on this?

Reason: