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
Yes, I understand how to work with binary digits.
From this code it comes out, e.g. the function returned 3 .
(11&1)==1 ; 11==01 no, that's false, it didn't work.
I was just writing this and thought maybe I misunderstood the operations.
& it means I convert decimal values to binary and do a bitwise conjunction.
== true when the first term is equal to the second term. Is this correct?
Check what will be returned
This is the stuff I don't understand, I'm self-taught. I just know how to check and what I can get. Your example (11&1)==1 will result in true as 11 can only be made up of flags 1+2+8 hence 1 is included in the set.
Check what will be returned
A bitwise operation, this is a P O B I T O R T operation. It works with bits. For example, 1 is 00000001. 2 is 00000010. A flag can only be 1, 2, 4, 8, etc. In short, one bit is busy.
And a set of flags can have any bits occupied, for example 00000101. This set includes flag 00000001 and 00000100. And to find out if some flag is included in the set of flags, you have to do a bitwise "and" of the flag and the set, if it leaves a flag, it means it is in the set:
(00000101& 00000100) == 00000100 - true. This means that there is a flag 00000101 in the set 00000101.
A bitwise operation, this is a P O B I T O R T operation. It works with bits. For example, 1 is 00000001. 2 is 00000010. A flag can only be 1, 2, 4, 8, etc. In short, one bit is busy.
And a set of flags can have any bits occupied, for example 00000101. This set includes flag 00000001 and 00000100. And to find out whether some flag is included in the set of flags, you have to do a bitwise "and" of the flag and the set, if after that a flag remains, it means it is in the set:
(00000101& 00000100) == 00000100 - true. This means that there is a flag 00000101 in the set 00000101.
Is it true that (positive term 1 == positive term 2) but positive term 1 is not equal to positive term 2? It turns out so, because the help says that truth is any non-zero value, and then the code works.
In what place of the reference? Exactly where and what?
This seems to me to be a contradiction. It is true not if a equals b, but if a and b are different from zero. Well, it's not a contradiction, it's not clearly written. I think I've got it, thank you.
ENUM_SYMBOL_TRADE_EXECUTION It doesn't say what type it has, and the headers in help are mixed up (it seemed to be written for string, and then without mentioning started talking about integers) . I tried all three options, but each time compiler error. What is wrong?
You have to do it this way: