![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий
Советники: cm manual grid
fxsaber, 2019.07.15 18:06
Conversion under MT5 without changing the original source.
Below is the animation in the Visualizer (click on the image).
This library is amazing!! So easy to run MT4 code in MT5. Thanks a lot
I have one issue the OrderTicket() function doesn't not return the right number when the trade is closed. This is a real problem to follow a trade when is closed.
For example a trade # 4584849 will become # 38484939 when closed.
Thanks in advance for your help
This is my code in a script:
for(int dfz_in_29=0 ; dfz_in_29<OrdersTotal() ; dfz_in_29 = dfz_in_29 + 1)
{
if(OrderSelect(dfz_in_29,SELECT_BY_POS,MODE_TRADES) && OrderSymbol()==Symbol())
{
if(OrderType()==0)
{
dfz_in_12 = OrderTicket() ; // the OrderTicket() is no return value, in demo , the value is Error 4003 // -2045194504 ?
}}}
what about are this ... please tell me too :thanx very much ...
Please edit your post and use the code button (Alt+S) when pasting code.
EDIT your original post, please do not just post the code correctly in a new post.
Bug found:
Function OrderOpenReason() returns (ENUM_DEAL_REASON)DEAL_REASON_TP for orders closed on takeprofit.
Bug found:
Function OrderOpenReason() returns (ENUM_DEAL_REASON)DEAL_REASON_TP for orders closed on takeprofit.
Thank you! Fixed.
At my request, the MetaQutoes has completely localized the latest update of the library into English. The latest build of the library is now available on the English page with comments in the source code translated into English.
Difference from the previous version that was available on the English-language page.
I recommend using the latest version along with the synchronization mechanism. Then all the problems that no other trading library can solve will be imperceptible.
For this mechanism to work, you need to download this library. All complex and effective checks of the correctness of the trading environment will be done automatically, without distracting the user when writing trading logic.