Hello,
Does anyone know if TICK_FLAG can have a larger value of 252?
Using CopyTicksRange I get TICKS_FLAGS which has 256 more than the flag.
Example: TICK_FLAG 312 instead of 56.
Is that correct?
Print attachment.
6 = 0110 // all digit "1" is a flag position
252 = 1111 1100 // all digit "1" is a flag position
312 = 0001 0011 1000 // all digit "1" is a flag position
string GetTickFlag( uint tickflag ) { string flag = " " + (string)tickflag; #define TICKFLAG_MACRO(A) flag += ((bool)(tickflag & TICK_FLAG_##A)) ? " TICK_FLAG_" + #A : ""; \ tickflag -= tickflag & TICK_FLAG_##A; TICKFLAG_MACRO(BID) TICKFLAG_MACRO(ASK) TICKFLAG_MACRO(LAST) TICKFLAG_MACRO(VOLUME) TICKFLAG_MACRO(BUY) TICKFLAG_MACRO(SELL) #undef TICKFLAG_MACRO if (tickflag) flag += " FLAG_UNKNOWN (" + (string)tickflag + ")"; return(flag); } void OnStart() { Print(GetTickFlag(312)); Print(GetTickFlag(344)); Print(GetTickFlag(376)); }
Result
312 TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY FLAG_UNKNOWN (256) 344 TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_SELL FLAG_UNKNOWN (256) 376 TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY TICK_FLAG_SELL FLAG_UNKNOWN (256)
Hello,
Does anyone know if TICK_FLAG can have a larger value of 252?
Using CopyTicksRange I get TICKS_FLAGS which has 256 more than the flag.
Example: TICK_FLAG 312 instead of 56.
Is that correct?
Print attachment.
Does anyone know if TICK_FLAG can have a larger value of 252?
...and TICK_FLAG is of type uint, so the value may be 4 294 967 295
...and TICK_FLAG is of type uint, so the value may be 4 294 967 295
Hello,
Does anyone know if TICK_FLAG can have a larger value of 252?
Using CopyTicksRange I get TICKS_FLAGS which has 256 more than the flag.
Example: TICK_FLAG 312 instead of 56.
Is that correct?
Print attachment.
- 2016.03.21
- www.mql5.com
Result
Not unknown but undocumented.
Forum on trading, automated trading systems and testing trading strategies
Alain Verleyen, 2019.06.24 07:31
Yes it's correct. The additional bit used for internal management by MT5.I have merged the answers from the 2 topics.
Thanks for wasting mine and others' time by selfishly posting the same question twice. (sarcasm)
I have merged the answers from the 2 topics.
Thanks for wasting mine and others' time by selfishly posting the same question twice. (sarcasm)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use