What MQL4 error 4112 means
The official MQL4 runtime table names error 4112 ERR_TRADE_EXPERT_DISABLED_BY_SERVER and defines it as “automated trading by Expert Advisors or scripts is disabled by the trade server.” This is a server-side automated-trading restriction, distinct from a source syntax problem.
The error number is evidence about one failed call, not a diagnosis of the whole EA. Read the API sentinel first, then call GetLastError immediately because that function returns the current _LastError value and resets it.
