What MQL4 error 130 means
The official MQL4 runtime table names error 130 ERR_INVALID_STOPS and defines it as “invalid stops.” A stop loss, take profit, or pending-order price is invalid, unnormalized, or too close to the market under the server rules.
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.
