The translator now requires every #include to be a quoted path to an
existing file relative to the including file, as MetaEditor resolves it,
so a broken include path fails the tests instead of only the MetaEditor
build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the library to lib/ and the scripts to scripts/, and include project
files by quoted paths relative to the including file. Paths in <...> are
searched in MQL5/Include only, and the project is not there when it is
cloned into MQL5/Shared Projects. No .mqproj file is needed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The remote URL and tracking branch are visible from git itself, and the
credential setup is machine-specific, so neither belongs in the file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reference stream now has three chunks: forex-like data, negative
prices on a decimal sub-grid with crossed quotes, escapes and backward
time steps, and a 250 ms time step with a 25-point price step. This
covers negative operands of division, modulo and shifts, so any
compiler difference shows up as a golden mismatch in MetaTrader.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mql2cpp.py now also translates scripts (input variables, D'...' date
literals) and mql5_shim.h emulates the terminal functions they use
(CopyTicksRange/CopyTicks over a loaded tick file, TimeToStruct,
custom symbols, Comment, captured Print output). test_scripts.cpp runs
TkzExport with day/week/month chunks and checks every chunk against
independent calendar periods, then TkzVerify, TkzToCustom (including a
re-import) and TkzSelfTest. Also fix the shim's ArrayResize reserve
semantics, which reallocated on every call.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A valid payload is consumed exactly, so reading past its end or leaving
bytes unread now fails the decode immediately instead of producing
garbage until the checksum check. Headers with an impossible tick count
for their payload size or a table larger than 2^24 are rejected before
any allocation. The fuzz test mutates header and payload bytes, sizes
and lengths and requires every accepted chunk to decode to the original
ticks. The format and encoder output are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fetch_samples.sh downloads four public tick samples (Dukascopy EURUSD
and XAUUSD, a broker XAUUSD feed, US500) from Hugging Face and converts
them with a small pure-Python Parquet reader. baselines.py measures
xz/zstd on raw and delta-encoded ticks for comparison.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stretch, squash and rate tables become dynamic arrays so codec objects
stay small on the MQL5 stack; initialise variables the MQL5 compiler
cannot prove assigned and keep ternary branches the same type. Output
is byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hot path now reads Squash() from a precomputed table (byte-identical
output). The self-test encodes a deterministic data set and compares
size and FNV-1a hash with the reference C++ build, which catches any
MQL5 compiler difference that would make archives non-portable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TkzExport writes the tick history of a symbol into a .tkz archive
(day/week/month chunks, optional per-chunk verification), TkzVerify
decodes an archive and compares it with the terminal history,
TkzToCustom loads an archive into a custom symbol, and TkzSelfTest runs
CTkzSelfTest (synthetic edge cases, real ticks, archive I/O). The
self-test class is also compiled and run by the C++ harness.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Make ternary branches and compound assignments type-exact for the MQL5
compiler, avoid names that clash with built-in functions (Symbol,
Digits), store min/max tick time per chunk for range queries, and let
CTkzWriter decode each chunk again and compare it with its input.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Context-mixing compressor for time_msc/bid/ask tick history:
nibble-block hashed counters, two-layer logistic mixer, two APMs and a
32-bit binary arithmetic coder. Prices are mapped to exact integers
(auto-detected digits, common price step, optional decimal sub-grid),
irregular doubles are escaped and stored raw, so the round trip is
bit-exact. Each chunk is self-contained and carries a checksum.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>