MT5 Build 6230 - Startup script loaded but OnStart execution unverified
Post ALL what is needed to reproduce your issue if you need help : ini file, code and data file.
PS: I am tired of this BS AI report which report nothing useful.
Post ALL what is needed to reproduce your issue if you need help : ini file, code and data file.
PS: I am tired of this BS AI report which report nothing useful.
You agree to website policy and terms of use
Hello MetaQuotes developers and MQL5 community,
I am experiencing an unresolved startup-script execution issue in MetaTrader 5.
Environment:
Windows 10 x64, OS Build 19045
MetaTrader 5 Build 6230
MetaEditor Build 6230
Compilation: 0 errors, 0 warnings
Demo account
Algo Trading disabled
Server-side trading disabled
Startup configuration:
[Charts]
ProfileLast=XAUD_Rehearsal6230
[Experts]
Enabled=0
AllowLiveTrading=0
AllowDllImport=0
[StartUp]
Symbol=XAUUSD_HistData
Period=M1
Script=SpotwareNativeRehearsal6230
ShutdownTerminal=1
Expected behavior:
The terminal automatically executes OnStart(), reads a request file from the MQL5 Files sandbox, verifies account permissions, writes a diagnostic receipt, and shuts down.
Observed behavior:
The terminal starts and loads the intended EX5 successfully, but no diagnostic receipt is produced within three minutes.
The controller then requests graceful terminal closure.
Journal entries from December 4, 2026:
16:37:31.657 — script SpotwareNativeRehearsal6230 (XAUUSD_HistData,M1) loaded successfully
16:40:25.739 — initializing of SpotwareNativeRehearsal6230 (XAUUSD_HistData,M1) failed with code 0
16:40:25.739 — script SpotwareNativeRehearsal6230 (XAUUSD_HistData,M1) closes terminal with code 0
16:40:27.620 — shutdown with 0
The first statements in OnStart() are:
long deadline=0;
if(!Request(deadline)) return;
The Request() function begins with:
int f=FileOpen(Folder+"request.txt",FILE_READ|FILE_TXT|FILE_ANSI|FILE_SHARE_READ);
if(f==INVALID_HANDLE) return false;
The request file existed in the correct sandbox. However, the script did not contain an entry-point marker, so we cannot confirm whether OnStart() was dispatched or whether the script returned early.
Technical questions:
Under what conditions can a startup script load successfully without observable OnStart() execution?
What does initialization failure code 0 mean when recorded during terminal closure?
Can interrupted initialization produce this message?
Are there specific chart or custom-symbol readiness requirements for startup scripts?
Can disabling Algo Trading or setting Experts Enabled=0 prevent execution of a non-trading startup script?
What supported diagnostic procedure would distinguish failure before OnStart() from an early file-access failure?
Are there any known Build 6230 limitations affecting this startup sequence?
What is the recommended mechanism for automatic startup-script execution and terminal shutdown?
No trading orders, historical data imports, or Strategy Tester runs occurred during this rehearsal.
Any technical guidance would be appreciated.
Thank you.