MQL5 ReferenceStandard LibraryTrade ClassesCDealInfoMagic OrderTimeTimeMscDealTypeTypeDescriptionEntryEntryDescriptionMagicPositionIdVolumePriceCommisionSwapProfitSymbolCommentInfoIntegerInfoDoubleInfoStringTicketSelectByIndex Magic Gets the ID of the Expert Advisor, that executed the deal. long Magic() const Return Value ID of the Expert Advisor, that executed the deal. Note The deal should be selected using the Ticket (by ticket) or SelectByIndex (by index) methods. EntryDescription PositionId