Skip to content

[codex] Use TimeShield for MT4 legacy timing#50

Merged
NewYaroslav merged 8 commits into
mainfrom
codex/use-mql4-time-shield
Jul 2, 2026
Merged

[codex] Use TimeShield for MT4 legacy timing#50
NewYaroslav merged 8 commits into
mainfrom
codex/use-mql4-time-shield

Conversation

@NewYaroslav

@NewYaroslav NewYaroslav commented Jul 2, 2026

Copy link
Copy Markdown
Owner

What Changed

  • Updated external/time-shield-cpp to the MQL MetaEditor follow-up from [codex] Restore MQL MetaEditor compilation time-shield-cpp#115.
  • Replaced the local MT4 legacy timing helper logic with calls through <TimeShield.mqh>.
  • Switched MT4 legacy connector time constants to MQL4-compatible TSHIELD_ constants.
  • Picked up the TimeShield revision that keeps a single MQL5 public root header (TimeShield.mqh) instead of shipping both TimeShield.mqh and time_shield.mqh.
  • Fixed MT5 legacy connector compile issues found by MetaEditor: named-pipe read/write WinAPI types and JSON int to uint step fields.
  • Updated legacy connector docs to require matching MQL4 or MQL5 TimeShield headers.

Dependency

Depends on NewYaroslav/time-shield-cpp#115. PR #114 is already merged.

Validation

  • git diff --check
  • cmake --build build-codex --target legacy_trading_bridge_test --parallel
  • ./build-codex/legacy_trading_bridge_test.exe
  • Result: 9/9 tests passed.
  • MetaEditor 4 compile, staged package: LegacyTradingConnector.mq4 — 0 errors, 0 warnings.
  • MetaEditor 4 compile, staged package: LegacyTradingConnector-ru.mq4 — 0 errors, 0 warnings.
  • MetaEditor 5 compile, staged package without legacy root time_shield.mqh: LegacyTradingConnector.mq5 — 0 errors, 8 warnings.
  • MetaEditor 5 compile, staged package without legacy root time_shield.mqh: LegacyTradingConnector-ru.mq5 — 0 errors, 8 warnings.
  • Byte check before commit: no UTF-16/NUL MQL source files remain.

Notes

The remaining MT5 warnings are pre-existing conversion/import warnings; code generation succeeds.

Update the time-shield-cpp submodule to the MQL4 facade commit and replace the local MT4 legacy timing helper logic with calls through TimeShield.mqh.
Update the TimeShield submodule to the MQL4 class facade and replace legacy connector constant aliases with direct TimeShield constants in the MQL4 and MQL5 connector helpers.
Point the legacy MQL bridge integration at the TimeShield revision that exposes a single MQL4 TimeShield.mqh header.
Update the TimeShield submodule to the main-branch merge commit for NewYaroslav/time-shield-cpp#114.
Use the constants exported by TimeShield.mqh in the form accepted by the MQL4 compiler, avoiding unsupported class-qualified enum access.
Update the TimeShield submodule to the MQL MetaEditor fix branch and adjust the legacy connector MQL4/MQL5 code paths found by local MetaEditor compilation.
Update the legacy MQL4 connector to use TSHIELD-prefixed TimeShield constants and point the submodule at the matching dependency revision.
@NewYaroslav NewYaroslav marked this pull request as ready for review July 2, 2026 20:53
@NewYaroslav NewYaroslav merged commit 18cc1d6 into main Jul 2, 2026
1 check passed
@NewYaroslav NewYaroslav deleted the codex/use-mql4-time-shield branch July 2, 2026 20:53
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