MT5 · Compiler warnings
MT5 53 · 'OnStart' function can be defined only in a script | YI GOLD
Official meaning
'OnStart' function can be defined only in a script
Possible causes · YI GOLD suggestions
Determine the cause from the official meaning, the triggering function and terminal logs.
Troubleshooting · YI GOLD suggestions
Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.