vdemydiuk / mtapi

MetaTrader API (terminal bridge)
http://mtapi4.net/
MIT License
522 stars 281 forks source link

GetLastErrorString for Mt4Api #123

Closed darcome closed 6 years ago

darcome commented 6 years ago

Hi,

is it possible to have a funnction that returns the string error based on the value of GetLastError?

Thanks in advance, Luca

vdemydiuk commented 6 years ago

Hi. MQL5 does not have function ErrorDescription like MQL4. So there is only one way to implement this function: add it manually to MtApi and copy all descriptions from tables https://www.mql5.com/en/docs/constants/errorswarnings/enum_trade_return_codes https://www.mql5.com/en/docs/constants/errorswarnings/errorcodes I will do it in next release.

darcome commented 6 years ago

I am sorry, I didn't know Mt4Api already had an ErrorDescription function. I am happy with that :)

Thank you, Luca