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.
An error-state value is supporting context, not proof that a call failed or a diagnosis of the whole EA. For noncritical API failures, read the return value and then GetLastError, which resets _LastError. Critical errors such as zero division terminate execution, so code after the failing expression cannot serve as a recovery handler.
