Download MetaTrader 5

ObjectFind problem (bug)

To add comments, please log in or register
Shimarin
130
Shimarin  

Current version, ObjectFind is not working.

In debug mode, it works fine. But in notmal mode, it returns bad result.

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Running MQL5 Program Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Running MQL5 Program Properties - Documentation on MQL5
Files:
hasayama
616
hasayama  
Shimarin:

Current version, ObjectFind is not working.

In debug mode, it works fine. But in notmal mode, it returns bad result.

 

ObjectFind returns int value. Try to use:

if ( ObjectFind( _Symbol, objName ) < 0 ) { /*CREATE*/ }
else { /*FOUND*/ }

 

Shimarin
130
Shimarin  

Oh, yes you are right.

It's my misunderstandings.  Thanks. 

To add comments, please log in or register