MQL5: fix stale .ex5 and add timer-based command polling#1
Open
biohazardxxx wants to merge 2 commits intodevfrom
Open
MQL5: fix stale .ex5 and add timer-based command polling#1biohazardxxx wants to merge 2 commits intodevfrom
biohazardxxx wants to merge 2 commits intodevfrom
Conversation
OnTimer() (which drains the command queue via executeCommand()) was only called from OnTick() during backtesting. In live trading, commands from the .NET client would queue up and never be processed until the next market tick arrived, making the EA unresponsive on low-volume symbols or outside market hours. - Add EventSetMillisecondTimer(100) in init() for live trading mode - Call OnTimer() on every tick regardless of mode (supplements the timer) - Add EventKillTimer() in deinit() for cleanup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The .ex5 binary was stale and still referenced removed DLL imports (getIntValue, getDoubleValue, etc.) that no longer exist in MT5Connector.dll since the migration to the JSON payload-based protocol (getPayload). This caused "unresolved import function call" errors when loading the EA in MetaTrader. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
MtApi5.ex5was stale and still referenced removed DLL functions (getIntValue,getDoubleValue, etc.) fromMT5Connector.dll. Recompiled to match the current source which uses the JSON payload-based protocol (getPayload).OnTimer()/executeCommand()was only called fromOnTick()during backtesting. In live mode, commands from the .NET client would queue up until the next market tick, making the EA unresponsive on low-volume symbols or outside market hours. Now usesEventSetMillisecondTimer(100)in live mode.Test plan
MtApi5.ex5in MetaTrader 5 — verify no "unresolved import function call" errors🤖 Generated with Claude Code