Boolean is true or false.
-1 isn't a valid return value if a boolean is expected.
Boolean is true or false.
-1 isn't a valid return value if a boolean is expected.
Thank you for your reply, so i should replace it the code with this? if(IsStopped())return(false);
Thank you for your reply, so i should replace it the code with this? if(IsStopped())return(false);
Yes, but it depends on the declaration of the procedure that you created.
https://docs.mql4.com/basis/function
https://www.mql5.com/en/docs/basis/function
![Functions - Language Basics - MQL4 Reference Functions - Language Basics - MQL4 Reference](https://c.mql5.com/36/31/functions-language-basics-mql4.png)
- docs.mql4.com
![Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions](https://c.mql5.com/36/31/documentation-on-mql5-constants__38.png)
- www.mql5.com
Yes, but it depends on the declaration of the procedure that you created.
https://docs.mql4.com/basis/function
https://www.mql5.com/en/docs/basis/function
I did not create the source code, i merely just compiled it and found this error. The question is do i put true or false ?
I did not create the source code, i merely just compiled it and found this error. The question is do i put true or false ?
How can we answer with confidence if you do not display the contents of the code or function completely here :)
--
refer to https://www.mql5.com/en/forum/62715#comment_1820772
![Indicator Compilation Indicator Compilation](https://c.mql5.com/36/31/indicator-compilation.jpg)
- 2015.08.11
- www.mql5.com
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello
I just compile an EA i am getting one error : '1' - expression not boolean
When i go to line this is the code causing the error : if(IsStopped())return(-1);
How do i fix this?
I appreciate the help