Skip to content

feat: enhance MT5 integration with optional import and clear error handling - #1

Open
lnikodim wants to merge 2 commits into
FXDavid-OffbeatForex:mainfrom
lnikodim:nikodimov/macos-setup
Open

lnikodim wants to merge 2 commits into
FXDavid-OffbeatForex:mainfrom
lnikodim:nikodimov/macos-setup

Conversation

@lnikodim

@lnikodim lnikodim commented Sep 3, 2026

Copy link
Copy Markdown

No description provided.

lnikodim and others added 2 commits September 3, 2026 14:43
The run name becomes the /config: argument handed to terminal64.exe, and
MT5's own command-line parser splits that on whitespace. Any EA or
indicator with a space in its name therefore failed: the terminal logged

    cannot load config "Z:\...\Moving Average_20260903_155537.ini"" at start

and then — instead of exiting — started as a NORMAL INTERACTIVE session,
connected to the broker and idled at ~110% CPU until run_strategy_tester
hit its timeout_sec (default 1800s). The failure was silent and slow,
which made it look like a hang rather than a bad argument.

Route both run names through a new _run_name() that collapses whitespace
to underscores and also replaces the characters MT5 dislikes in a path.

Verified against the stock Examples/Moving Average EA on EURUSD H1
(2026-01-01..2026-06-01, open_prices): it now completes in ~15s and
reports net_profit 183.27, profit_factor 1.58, 104 trades — identical to
a space-free copy of the same EA, so both paths cross-check.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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