vdemydiuk / mtapi

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

Exception in private T SendCommand<T> #84

Closed nzyatkov closed 6 years ago

nzyatkov commented 6 years ago

Hi, I try to get ENUM parameters of history order. For example:

var orderType = (ENUM_ORDER_TYPE)Mt5ApiClient.HistoryOrderGetInteger(histTicket, ENUM_ORDER_PROPERTY_INTEGER.ORDER_TYPE);

but an System.InvalidCastException is thrown:

"Specified cast is not valid" in MtApi5.MtApi5Client.SendCommand[T](Mt5CommandType commandType, ArrayList commandParameters, Dictionary`2 namedParams)