What is the difference between CPositionInfo.identifier() and CPositionInfo.Ticket()?

Hi, im using standard Mq5 library CPositionInfo

I would like to ask what is the difference between CPositionInfo.identifier() and CPositionInfo.ticket();
I have found that some ppl are using Ticket(), but I didn’t find it in code. But it is working.

For me it looks those values are the same.

Thank you.

The source code of CPositionInfo is in Include\Trade\PositionInfo.mqh. You can look there to see the difference.

Of course, what you will find is that they simply wrap around POSITION_TICKET and POSITION_IDENTIFIER, but that gives you a place to look in the documentation.

https://www.mql5.com/en/docs/constants/tradingconstants/positionproperties

Thank you, it really helped.

For me it seems same because of using hedge accounts. Thank you again :slight_smile: