What does bit 0x80 mean in MqlTick.flags for historical ticks?
MQL5 Book: Working with real tick arrays in MqlTick structures / Creating application programs
- www.mql5.com
MetaTrader 5 provides the ability to work not only with the history of quotes (bars) but also with the history of real ticks. From the user...
Thank you for the link. I checked the tick flags listed in that chapter, but I couldn't find a definition for bit 0x80 (128). Is there a specific section or another official reference that explains this bit?
Original reference (comment #527):
The same undocumented bit was also discussed here in 2023:
В пятерке Comment вызывает обновление экрана, в отличие от четверки, где комментарий записывается в переменную
- 2018.12.04
- www.mql5.com
В тексте обсуждается различие в поведении Comment в пятёрке по сравнению с четвёркой, где отображение комментария не гарантируется. Также упоминаются изменения в MetaTrader 5, проблемы с функцией Copy, флаг TICK_FLAG_BID и кеширование ГА-оптимизации.
Thank you for the references. Slava's comment #527 describes a case where TICK_FLAG_BID is absent. In my sample, TICK_FLAG_BID was already set in both the live and historical ticks (6 to 134 and 2 to 130). Is 0x80 also expected to be set on historical ticks when TICK_FLAG_BID is already present?
On MT5 build 6230, I compared live-captured ticks with historical ticks for USDJPY.cl on OANDA-Japan MT5 Live. For matching ticks, MqlTick.flags changed from 6 to 134 or from 2 to 130. The only difference in the flags was bit 0x80 (128). Bid, Ask, and tick order matched for all 3,921 ticks. The reconstructed OHLC and BID-flag tick counts also matched all 59 complete M1 bars returned by CopyRates.
What does bit 0x80 mean in MqlTick.flags, and at what stage is it set? Does MT5 use this bit when replaying real ticks or constructing M1 bars? Is there an official reference for it?