Skip to content

[codex] Restore MQL MetaEditor compilation#115

Merged
NewYaroslav merged 3 commits into
mainfrom
fix/mql5-metaeditor-compile
Jul 2, 2026
Merged

[codex] Restore MQL MetaEditor compilation#115
NewYaroslav merged 3 commits into
mainfrom
fix/mql5-metaeditor-compile

Conversation

@NewYaroslav

@NewYaroslav NewYaroslav commented Jul 2, 2026

Copy link
Copy Markdown
Owner

What Changed

  • Fixed MQL5 DateTime factory construction so MetaEditor accepts the code path.
  • Fixed ISO8601 date validation to validate DateTimeStruct date fields explicitly.
  • Exposed MQL4 time constants as typed global TSHIELD_ constants because MQL4 does not support namespaces and does not expose nested enum values as TimeShield::... members.
  • Kept a single public MQL5 root header by moving the aggregate includes into MQL5/Include/TimeShield.mqh and removing the duplicate MQL5/Include/time_shield.mqh entry point.

Validation

  • MetaEditor 4 compile: temporary #include <TimeShield.mqh> smoke script — 0 errors, 0 warnings.
  • MetaEditor 5 compile: MQL5/Scripts/time_shield/tests/test_eet_to_gmt.mq5 — 0 errors, 7 warnings.
  • MetaEditor 5 compile: MQL5/Scripts/time_shield/tests/test_time_zone_matrix.mq5 — 0 errors, 7 warnings.
  • MetaEditor 5 compile: MQL5/Scripts/time_shield/examples/time_conversions_demo.mq5 — 0 errors, 8 warnings.
  • MetaEditor 5 compile: MQL5/Scripts/time_shield/examples/time_formatting_demo.mq5 — 0 errors, 7 warnings.
  • MetaEditor 5 compile: MQL5/Scripts/time_shield/examples/time_parser_demo.mq5 — 0 errors, 7 warnings.
  • git diff --check
  • cmake --build tmp/agent-work/build-mql4 --parallel 36
  • ctest --test-dir tmp/agent-work/build-mql4 --output-on-failure
  • Result: 50/50 C++ tests passed.

Notes

The MQL5 warnings are pre-existing import/type-conversion warnings and do not block code generation.

Adjust MQL5 DateTime construction and ISO date validation for MetaEditor, and expose MQL4 TimeShield constant access through static methods.
Replace MQL4 TimeShield constant accessor methods with typed global TSHIELD-prefixed constants and document the public MQL4 constant style.
@NewYaroslav NewYaroslav marked this pull request as ready for review July 2, 2026 20:52
@NewYaroslav NewYaroslav merged commit 807944e into main Jul 2, 2026
10 checks passed
@NewYaroslav NewYaroslav deleted the fix/mql5-metaeditor-compile branch July 2, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant