-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MtApi.MtExecutionException: 'Response from MetaTrader is null' #249
Comments
In order to get the application working again I have to relaunch mt4. |
This does also occur sometimes with mt5, but often due to invalid api calls. For example when a parallel call did lead to a disconnect which then results in your mentioned exception. So, the issue is maybe not located in your api call, instead somewhere else. |
Ok I used the client GUI that comes with the solution as my starting point and modified as needed. I never really understood why you need to have a chart for each symbol and mtapi ea on each chart. Seems like we can reduce traffic by using a collection send symbols get current bids and asks back in a xml doc. |
More details: System.ServiceModel.CommunicationException This exception was originally thrown at this call stack: |
I have a fix for you, use a lock in the Execute method.
|
MtApi.MtExecutionException
HResult=0x80131500
Message=Response from MetaTrader is null
Source=MtApi
StackTrace:
at MtApi.MtApiClient.SendCommand[T](MtCommandType commandType, ArrayList commandParameters, Dictionary`2 namedParams) in \MtApi\MtApiClient.cs:line 3063
The text was updated successfully, but these errors were encountered: