-
Notifications
You must be signed in to change notification settings - Fork 229
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
[Pending Resolution] GET_ALL_OPEN_TRADES_() Bug > 18 trades #59
Comments
I have the same problem i do not know how to solve!! Did you find the solution? Thanks! |
This is due to a mql string limitation. The return response is too long. I simply created another DWX_GetOpenOrders function with a new InformPullClient and shrinked the "zmq_ret" response as much as possible. I can successfully pull around 130 opened trades. |
Could you share the new function that you developed? It would be very useful. Thanks. |
Great stuff @kkhanh ! 🙂 We'd be super grateful if you could share your solution here? 🙏 It would be benefit the rest of the user community + we would of course patch the code and credit you with the solution! Many thanks. |
Finally I did something similar, creating a new function in mql and its counterpart in python to call it. Curiously I also reached the 130 open trades, but for that I had to replace the dictionary by a list, saving the space that the keys take, then when receiving the message python is responsible for displaying the list in a dictionary to maintain compatibility. But to reach that limit I had to eliminate several fields of information, like magic number, comment, stop loss, take profit,... but only because in our system they are not necessary. So I think it's not an adequate general solution, and it raises the limit a lot, but the limit still exists. Although I have not implemented it, I consider that a suitable general solution would be to divide the information in several messages, or even a message by trade, but for it a protocol must be established that allows the receiver to check the integrity of the information, that does not lose messages of trades. Perhaps with an initial message detailing the number of messages that follow it, and a defined numbering for each subsequent message. |
I have a solution for this. I just paginate the trade collection. Here is the code example :
` I had to change the mql code and the backend code to make this works. |
Hi,
DWX_MTX_GET_ALL_OPEN_TRADES() doesnt return anything when there are more than 18 trades opened.
Any workaround ?
The text was updated successfully, but these errors were encountered: