[codex] Add MQL4 TimeShield facade#114
Merged
Merged
Conversation
Add a minimal MQL4 include package with time constants, timestamp helpers, second-of-day conversion, and time-of-day parsing under the time_shield namespace. Document MetaTrader usage and mark MQL sources as text for diffs.
Replace the MQL4 namespace-style headers with a static TimeShield class facade, matching MQL4 language constraints while preserving the TimeShield.mqh entry point.
Move the MQL4 static TimeShield API into the public TimeShield.mqh header and remove the duplicate time_shield.mqh entry point.
Replace the mojibake-prone source archive comment with an ASCII English comment while keeping the archive and MQL text attributes unchanged.
NewYaroslav
added a commit
to NewYaroslav/optionx_cpp
that referenced
this pull request
Jul 2, 2026
Update the TimeShield submodule to the main-branch merge commit for NewYaroslav/time-shield-cpp#114.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
MQL4/Include/TimeShield.mqhas the single public MQL4 header.TimeShieldclass.Why
OptionX legacy MQL4 code needs the same public
#include <TimeShield.mqh>entry point that MQL5 already uses, without keeping a local legacy time helper in the connector package.Validation
cmake -S . -B tmp/agent-work/build-mql4 -G "MinGW Makefiles" -DTIME_SHIELD_CPP_BUILD_TESTS=ON -DTIME_SHIELD_CPP_BUILD_EXAMPLES=OFFcmake --build tmp/agent-work/build-mql4 --parallel 36ctest --test-dir tmp/agent-work/build-mql4 --output-on-failureNot Run