Для MetaTrader 5 написана торговая библиотека MT4Orders . Начиналось так. // Список изменений: // 03.08.2016: // Релиз - писался и проверялся только на оффлайн-тестере. Сегодня библиотеке
One of the popular brokers has removed part of the trading history from all trading accounts of its clients. Therefore, many users have encountered that the library issues warnings due to an incorrect history on the trade server.
This issue has been fixed in the latest release.
Download the latest version of the library from the Russian-language page.
In MT4, closing 0.01 lots of a 0.1 lot order results in the original ticket being closed with a 0.01 lot size and the order comment of that partially-closed order changes to "to: xxxxxx". At the same time, a new, 0.09 lot order is opened with the comment set to "from: xxxxxx".
That doesn't seem to be happening in MT5 (at least, OrdersToString() lists no order comment text for the open or closed portions) so I can't follow the chain of partial closes as I normally would.
Do you have a snippet of MT4Orders-compatible code you can share, or can you explain how I can do it reliably?
In MT4, closing 0.01 lots of a 0.1 lot order results in the original ticket being closed with a 0.01 lot size and the order comment of that partially-closed order changes to "to: xxxxxx". At the same time, a new, 0.09 lot order is opened with the comment set to "from: xxxxxx".
That doesn't seem to be happening in MT5 (at least, OrdersToString() lists no order comment text for the open or closed portions) so I can't follow the chain of partial closes as I normally would.
Do you have a snippet of MT4Orders-compatible code you can share, or can you explain how I can do it reliably?
Hi@fxsaber thanks a lot for providing that library, awesome! 👏👏👏
Do you think you could publish it on GitHub or any other Git provider? This way we could always have automated access to the last revision via version control.
Hi@fxsaber thanks a lot for providing that library, awesome! 👏👏👏
Thanks you.
Do you think you could publish it on GitHub or any other Git provider? This way we could always have automated access to the last revision via version control.
Unfortunately, I am not ready to provide such support. The main examples of use in the Russian thread of the library and on my blog.
I see. I was not referring to usage, but to keep it under version control with Git, so that the code and revisions could be properly tracked :)
It seems that the file is already on GitHub: https://github.com/yiliuyan161/convert_mql4_to_mql5/blob/main/src/main/resources/static/file/MT4Orders.mqh
but it would be nice if you (the original author) keep it there under your profile for any future update, so all users would have the ability to pull potential changes =) --and even automate that process :))
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
The library is five years old.
The achievements of the library can be read here by selecting the desired language for translation.
Results.
Good!
The latest version is always here.
One of the popular brokers has removed part of the trading history from all trading accounts of its clients. Therefore, many users have encountered that the library issues warnings due to an incorrect history on the trade server.
This issue has been fixed in the latest release.
Download the latest version of the library from the Russian-language page.
I have quick question regarding partial closes.
In MT4, closing 0.01 lots of a 0.1 lot order results in the original ticket being closed with a 0.01 lot size and the order comment of that partially-closed order changes to "to: xxxxxx". At the same time, a new, 0.09 lot order is opened with the comment set to "from: xxxxxx".
That doesn't seem to be happening in MT5 (at least, OrdersToString() lists no order comment text for the open or closed portions) so I can't follow the chain of partial closes as I normally would.
Do you have a snippet of MT4Orders-compatible code you can share, or can you explain how I can do it reliably?
I have quick question regarding partial closes.
In MT4, closing 0.01 lots of a 0.1 lot order results in the original ticket being closed with a 0.01 lot size and the order comment of that partially-closed order changes to "to: xxxxxx". At the same time, a new, 0.09 lot order is opened with the comment set to "from: xxxxxx".
That doesn't seem to be happening in MT5 (at least, OrdersToString() lists no order comment text for the open or closed portions) so I can't follow the chain of partial closes as I normally would.
Do you have a snippet of MT4Orders-compatible code you can share, or can you explain how I can do it reliably?
Example.
Example.
That's perfect! ...thanks for the quick response :)
Hi @fxsaber thanks a lot for providing that library, awesome! 👏👏👏
Do you think you could publish it on GitHub or any other Git provider? This way we could always have automated access to the last revision via version control.
It may even get contributions :o)
What do you think?
Cheers!!
Hi @fxsaber thanks a lot for providing that library, awesome! 👏👏👏
Thanks you.
Do you think you could publish it on GitHub or any other Git provider? This way we could always have automated access to the last revision via version control.
Unfortunately, I am not ready to provide such support. The main examples of use in the Russian thread of the library and on my blog.
Thanks you.
Unfortunately, I am not ready to provide such support. The main examples of use in the Russian thread of the library and on my blog.
Thanks for answering @fxsaber
I see. I was not referring to usage, but to keep it under version control with Git, so that the code and revisions could be properly tracked :)
It seems that the file is already on GitHub: https://github.com/yiliuyan161/convert_mql4_to_mql5/blob/main/src/main/resources/static/file/MT4Orders.mqh
but it would be nice if you (the original author) keep it there under your profile for any future update, so all users would have the ability to pull potential changes =) --and even automate that process :))
Regards!
I was not referring to usage, but to keep it under version control with Git, so that the code and revisions could be properly tracked :)
Thanks for the suggestion. I'm far from programmer's toolkit. I'm too old for that kind of enthusiasm.