MT4 · Runtime errors
MT4 4002 · Array index is out of range | YI GOLD
ERR_ARRAY_INDEX_OUT_OF_RANGE
Official meaning
Array index is out of range
Possible causes · YI GOLD suggestions
Array size, index, type or series orientation violates function requirements.
Troubleshooting · YI GOLD suggestions
Check length, bounds, dynamic-array declarations and ArraySetAsSeries. Validate returned element counts before access.