Three different causes hide behind "invalid stops"
Posted: Sat Oct 31, 2026 2:15 pm
Error 130 gets blamed on the stop level, yet at least three separate things trigger it. The obvious one is placing a stop closer than the broker's minimum distance. The second is placing it on the wrong side of the market, which happens when a script uses a stale price. The third is wrong rounding, such as a stop price with too many decimals for the symbol.
The stale price case is common on fast tape. The EA reads the ask, calculates a stop, and by the time the request arrives, the market has moved enough that the stop now sits inside the minimum distance.
Another trap is mixing up bid and ask. A buy stop-loss is compared against the bid, while a sell stop-loss is compared against the ask. Using the wrong side shaves off the spread from the distance and can push a borderline stop into invalid territory.
Defensive code refreshes rates immediately before sending, adds a small buffer to the minimum distance, and normalizes the price.
Which of the three causes shows up most in the logs?
The stale price case is common on fast tape. The EA reads the ask, calculates a stop, and by the time the request arrives, the market has moved enough that the stop now sits inside the minimum distance.
Another trap is mixing up bid and ask. A buy stop-loss is compared against the bid, while a sell stop-loss is compared against the ask. Using the wrong side shaves off the spread from the distance and can push a borderline stop into invalid territory.
Defensive code refreshes rates immediately before sending, adds a small buffer to the minimum distance, and normalizes the price.
Which of the three causes shows up most in the logs?