MQL5 ReferenceStandard LibraryTrade ClassesCOrderInfoPositionId TicketTimeSetupTimeSetupMscOrderTypeTypeDescriptionStateStateDescriptionTimeExpirationTimeDoneTimeDoneMscTypeFillingTypeFillingDescriptionTypeTimeTypeTimeDescriptionMagicPositionIdVolumeInitialVolumeCurrentPriceOpenStopLossTakeProfitPriceCurrentPriceStopLimitSymbolCommentInfoIntegerInfoDoubleInfoStringStoreStateCheckStateSelectSelectByIndex PositionId Gets the ID of position. long PositionId() const Return 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. Magic VolumeInitial