Does anyone know if TICK_FLAG can have a larger value of 252?

To add comments, please log in or register
Keith Watford
Moderator
24171
Keith Watford  
Comments that do not relate to the "What does MQLtick flag mean?", have been moved into this topic.
dvd
107
dvd  

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.


fxsaber
17798
fxsaber  
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)
Alain Verleyen
40775
Alain Verleyen  
dvd:

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.


Please don't double post. Doing that you are wasting people time.
MqlTick Flags
MqlTick Flags
  • 2016.03.21
  • www.mql5.com
Hello, I'm kinda new to Trading but I've been programming in C#, C++, Obj-C for a while now, I ain't having any big issues at the moment with Mql5...
apirakkamjan
60
apirakkamjan  

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

Alain Verleyen
40775
Alain Verleyen  
dvd:

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.


Yes it's correct. The additional bit used for internal management by MT5.
Taras Slobodyanik
39453
Taras Slobodyanik  
dvd:

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

Alain Verleyen
40775
Alain Verleyen  
Taras Slobodyanik:

...and TICK_FLAG is of type uint, so the value may be 4 294 967 295

Yeah and will be the semantic of higher bits ? This bit-8 is already undocumented. However with Metaquotes all is possible I guess.
Keith Watford
Moderator
24171
Keith Watford  
dvd:

I have merged the answers from the 2 topics.

Thanks for wasting mine and others' time by selfishly posting the same question twice. (sarcasm)

Alain Verleyen
40775
Alain Verleyen  
Keith Watford:

I have merged the answers from the 2 topics.

Thanks for wasting mine and others' time by selfishly posting the same question twice. (sarcasm)

Thanks Keith.
12
To add comments, please log in or register