Read the MQL5 reference documentation: CopyTicks .
Especially the comparison part:
//+------------------------------------------------------------------+ //| Returns the string description of a tick | //+------------------------------------------------------------------+ string GetTickDescription(MqlTick &tick) { string desc=StringFormat("%s.%03d ", TimeToString(tick.time),tick.time_msc%1000); //--- Checking flags bool buy_tick=((tick.flags&TICK_FLAG_BUY)==TICK_FLAG_BUY); bool sell_tick=((tick.flags&TICK_FLAG_SELL)==TICK_FLAG_SELL); bool ask_tick=((tick.flags&TICK_FLAG_ASK)==TICK_FLAG_ASK); bool bid_tick=((tick.flags&TICK_FLAG_BID)==TICK_FLAG_BID); bool last_tick=((tick.flags&TICK_FLAG_LAST)==TICK_FLAG_LAST); bool volume_tick=((tick.flags&TICK_FLAG_VOLUME)==TICK_FLAG_VOLUME); //--- Checking trading flags in a tick first if(buy_tick || sell_tick) { //--- Forming an output for the trading tick desc=desc+(buy_tick?StringFormat("Buy Tick: Last=%G Volume=%d ",tick.last,tick.volume):""); desc=desc+(sell_tick?StringFormat("Sell Tick: Last=%G Volume=%d ",tick.last,tick.volume):""); desc=desc+(ask_tick?StringFormat("Ask=%G ",tick.ask):""); desc=desc+(bid_tick?StringFormat("Bid=%G ",tick.ask):""); desc=desc+"(Trade tick)"; } else { //--- Form a different output for an info tick desc=desc+(ask_tick?StringFormat("Ask=%G ",tick.ask):""); desc=desc+(bid_tick?StringFormat("Bid=%G ",tick.ask):""); desc=desc+(last_tick?StringFormat("Last=%G ",tick.last):""); desc=desc+(volume_tick?StringFormat("Volume=%d ",tick.volume):""); desc=desc+"(Info tick)"; } //--- Returning tick description return desc; }

Documentation on MQL5: Timeseries and Indicators Access / CopyTicks
- www.mql5.com
CopyTicks - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5

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
Hi,
I use MetaTrader5 python package dl from Pypi.
I downloaded ticks with copy_ticks_range() and in the result I have a field "flags" uint32.
On the all the ticks I received I have 3 different values for this field: 4, 130 and 134.
In accordance to https://www.mql5.com/en/docs/integration/python_metatrader5/mt5copyticksfrom_py#tick_flag I have:
print(mt5.TICK_FLAG_BID) #Bid price changed
2
print(mt5.TICK_FLAG_ASK) # Ask price changed
4
print(mt5.TICK_FLAG_LAST) #Last price changed
8
print(mt5.TICK_FLAG_VOLUME) # Volume changed
16
print(mt5.TICK_FLAG_BUY) # last Buy price changed
32
print(mt5.TICK_FLAG_SELL) # last Sell price changed
64
For 4, it seems ok with the few ticks I checked, but I can't find any reason for 130 and 134 (because the sum of all flags is inferior to 130) !
Also 130 + 4 is 134 ! But what could I do with this clue (if it's one)
Any info or idea ?
Thanks
Alex
EDIT:
Also in the documentation https://www.mql5.com/en/docs/integration/python_metatrader5/mt5copyticksfrom_py
At the end of the page, tick results are showing 134 for the flag value, so I think this is a MetaTrader 5 situation and not related my broker/account