vdemydiuk / mtapi

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

Create batch requests. #150

Open darcome opened 5 years ago

darcome commented 5 years ago

I don't know how easy this would be... both to implement and for the user to use it, but...

Do you think it would be possible to have batch requests so that it will take less time to get the result for all the requests? That's because there will only be one request and response from the EA rather than a request and response for every command...

The implementation? Something like this: mtApi.StartBatchRequests(); mtapi.AccountBalance(); mtapi.iMA(); ... ... List results = mtApi.EndBatchRequests();

Where MTApiResult would contains the commandType and the result for each request.

What do you think?

Thanks in advance!

vdemydiuk commented 5 years ago

Hi, It is interesting idea. I will think about possibility of implementation. And if it will take good profit in time of execution functions in batch I will add it into release of MtApi.