DocumentationMQL5 ReferenceStandard LibraryTrade ClassesCOrderInfoPositionIdPositionIdPositionIdGets the ID of position.long PositionId() constReturn Value ID of position, in which the order was involved.Note The order should be selected using the Select (by ticket) or SelectByIndex (by index) methods. Last updated on 2026-07-24MagicVolumeInitial