I would like to ask for clarification regarding MetaTrader 5 / MQL5 OHLC price representation.
I am developing a deterministic market-data processing system and need to correctly distinguish the authoritative price identity from the IEEE-754 binary64 runtime representation.
During testing with EURUSD M1 data, I observed OHLC values such as:
1.1610800000000001
1.1623999999999999
The same bars were captured independently through:
native MQL5
MetaTrader5 Python/NumPy interface
The values were bit-for-bit identical between native MQL5 and Python, so the additional digits are already present in the MT5-accessible double representation and are not introduced by Python processing.
Can a valid MT5 quote/OHLC value have an economic price identity outside the symbol tick grid, or can the binary64 representation legitimately appear slightly above/below the exact decimal value?
For deterministic software processing, is the recommended approach:
preserve the original double value as raw evidence,
and derive canonical tick/decimal identity from the symbol specification?
I am not asking for internal implementation details. I only need the intended public MT5/MQL5 semantics.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hello,
I would like to ask for clarification regarding MetaTrader 5 / MQL5 OHLC price representation.
I am developing a deterministic market-data processing system and need to correctly distinguish the authoritative price identity from the IEEE-754 binary64 runtime representation.
During testing with EURUSD M1 data, I observed OHLC values such as:
1.1610800000000001 1.1623999999999999The same bars were captured independently through:
The values were bit-for-bit identical between native MQL5 and Python, so the additional digits are already present in the MT5-accessible double representation and are not introduced by Python processing.
The tested symbol specification was:
SYMBOL_DIGITS = 5 SYMBOL_POINT = 0.00001 SYMBOL_TRADE_TICK_SIZE = 0.00001My question:
For a symbol with a 0.00001 tick size, should values such as:
1.1610800000000001 1.1623999999999999be interpreted according to the valid symbol price grid as:
1.16108 1.16240with the extra digits being only a binary floating-point representation effect?
More specifically:
I am not asking for internal implementation details. I only need the intended public MT5/MQL5 semantics.
Thank you.