Don Baechtel: ... but the CDealInfo class does not have an equivalent DEAL_EXTERNAL_ID string function. Why not?
It does, but unfortunately not documented ...
..\MQL5\Include\Trade\DealInfo.mqh
//--- fast access methods to the string position properties string Symbol(void) const; string Comment(void) const; string ExternalId(void) const;
//+------------------------------------------------------------------+ //| Get the property value "DEAL_EXTERNAL_ID" | //+------------------------------------------------------------------+ string CDealInfo::ExternalId(void) const { return(HistoryDealGetString(m_ticket,DEAL_EXTERNAL_ID)); }
When in doubt, take a look at the source code. You may find extra functionality that is not properly documented.
Also, you can use the CDealInfo::InfoXXX() methods to get other properties, when not implemented explicitly by the class ...
Access to MQL5 API functions
Gets the value of specified integer type property
Gets the value of specified double type property
Gets value of specified string type property
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The HistoryDealGetString() has a DEAL_EXTERNAL_ID string property for HistoryDealGetString(),
but the CDealInfo class does not have an equivalent DEAL_EXTERNAL_ID string function. Why not?
If the CDealInfo class implementation incomplete or is the DEAL_EXTERNAL_ID now an obsolete property?
Is there a way to use the CDealInfo class to retrieve the DEAL_EXTERNAL_ID?
I searched the MT% forums for references to DEAL_EXTERNAL_ID , but it didn't return any relevant information.