MT5 · Trade return codes
MT5 10038 · A close volume exceeds the current position volume | YI GOLD
TRADE_RETCODE_INVALID_CLOSE_VOLUME
Official meaning
A close volume exceeds the current position volume
Possible causes · YI GOLD suggestions
Volume falls outside symbol minimum, maximum, step or directional aggregate limits.
Troubleshooting · YI GOLD suggestions
Read volume_min, volume_max, volume_step and volume_limit for the actual symbol. Round down to the step; do not send an order below minimum volume.