Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1031
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
Good afternoon!!!
Can anyone tell me what's wrong.
The last closed order is
OrderSelect( OrdersHistoryTotal() -1 ,SELECT_BY_POS,MODE_HISTORY )
when searching for a later time , compare times, not tickets
tried it, result is the same.
The first screenshot shows Buy orders closed, but the log does not show the closing time.
The second one shows Sell orders have closed but the log shows the time of Buy orders.
The third one is the same.
The last closed order is
OrderSelect( OrdersHistoryTotal() -1 ,SELECT_BY_POS,MODE_HISTORY )
Не помогло...
//+------------------------------------------------------------------+
//| Время закрытия последнего ордера |
//+------------------------------------------------------------------+
double Last_Ticets_Close()
{
Last_Ticet = 0;
Last_OrClTime = 0;
for(int i=0; i<OrdersHistoryTotal(); i++)
{
if(OrderSelect( OrdersHistoryTotal()-1,SELECT_BY_POS,MODE_HISTORY))
{
if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic)
{
if(Last_OrClTime<OrderCloseTime())
{
Last_Ticet = OrderTicket();
Last_OrClTime = OrderCloseTime();
}
}
}
}
return (Last_Ticet);
}
No change.
I've got it sorted out.
Thank you all very much...
figured it out.
please
Here's a useful thread with ready-made solutions to all beginner's questions "Useful features from KimIV only"
please
Here's a useful thread with ready-made solutions to all beginner's questions "Only "Useful features from KimIV"
There's not Igor's collected functions there, but exactly his topic- everything is there, not just the ones deemed necessary by someone else.
There are not collected by someone else functions of Igor, but exactly his topic - there are all, not only those considered necessary by someone else.
I can be wrong, but your link will be the author's topic, but you need to leaf through the whole topic, it seems that Igor posted a bit raw codes at once, and then sometimes rewrote what needed improvement, although again I can be wrong - I leafed through this topic about 5-6 years ago, I do not remember anymore
I could be wrong, but your link will be the author's topic, but you have to leaf through the whole topic, Igor seems to have posted slightly raw codes, and then sometimes rewrote what needed improvement, although again I could be wrong - I leafed through this topic about 5-6 years ago, I do not remember anymore
please
Here's a useful thread with ready-made solutions to all beginner's questions "Only "Useful features from KimIV"
Thanks again.