Read the documentation - ObjectFind is not a boolean function, it returns a negative number if it doesn't exist and anything other than 0 equates to true.
0 means that the object has been found in the main window of the chart
it returns an integer of less than 0 if not found
Read the documentation - ObjectFind is not a boolean function, it returns a negative number if it doesn't exist and anything other than 0 equates to true.
0 means that the object has been found in the main window of the chart
it returns an integer of less than 0 if not found
I didn't word that very well did I :)
ObjectFind is not a boolean function
If the object is not found, the function returns a negative number
As the object does not exist a negative number is returned
As Alladir is testing a number as a boolean ,and anything other than 0 equates to true, Alladir's code will return true if the object does not exist.
If it does exist and is in the main window, Alladir would have found it return false, because the main window is expressed as 0
I didn't word that very well did I :)
ObjectFind is not a boolean function
If the object is not found, the function returns a negative number
As the object does not exist a negative number is returned
As Alladir is testing a number as a boolean ,and anything other than 0 equates to true, Alladir's code will return true if the object does not exist.
If it does exist and is in the main window, Alladir would have found it return false, because the main window is expressed as 0
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I've been away a while.. lots changed!
But today I'm getting ObjectFind return "true" when there is no object with that name...
You get the same?