Download MetaTrader 5

What is the correct way to write a double greater than or less than statement

To add comments, please log in or register
What are the latest MQL5.community news? The Wall section will tell you!
Baruch Fishman
705
Baruch Fishman 2014.07.06 18:46 

Hi,

 I have been coding in mt4 for a few years now.  I would run into something like this.

 

I want to write as an example

if(x>0 && x<10000)return(0);

 Now I know you can combine them somehow so I combined them like

if(0<x<10000)return(0);

 

 However I get the following warning.  Am I missing something.  Mind you I know it will work the first way but I wanted to try it the shorthand way.

expression is always true

To add comments, please log in or register