farhadmax: what does this 15 mean?
here in this link it says that the return value should be 1 or 2 or 4 or 8
It's a bit map. 15 means 1 or 2 or 4 or 8. (SII(mode) & SYMBOL_EXPIRATION_XXX) != 0 Means XXX allowed.
Here is a code from mql5 website
//+------------------------------------------------------------------+ //| Checks if the specified expiration mode is allowed | //+------------------------------------------------------------------+ bool IsExpirationTypeAllowed(string symbol,int exp_type) { //--- Obtain the value of the property that describes allowed expiration modes int expiration=(int)SymbolInfoInteger(symbol,SYMBOL_EXPIRATION_MODE); //--- Return true, if mode exp_type is allowed return((expiration&exp_type)==exp_type); }
i dont understand this part of the code :
return((expiration&exp_type)==exp_type);
could you explain it a little bit? what does that & do?
farhadmax #: i dont understand this part of the code :
return((expiration&exp_type)==exp_type);
Expiration & exp_type isolates that bit; the result is zero or that bit. If the result is zero, the expression is false otherwise true. Return the result.
Simplified. True is non-zero. | return expiration & exp_type; |

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hello
Im a liitle bit confused about this. I donkt know how to explain it.
Im trying to get information about Symbol. here is my script.
what does this 15 mean?
here in this link it says that the return value should be 1 or 2 or 4 or 8
Im confused