If you do not access the trading account history, I recommend that you use "OnTradeTransaction": find a deal whose DEAL_ENTRY property is "DEAL_ENTRY_OUT"; The "DEAL_TIME" property is the closing time.
Man: Does anyone know is there any substitutes for OrderCloseTime() in MQL5?
| Of course there is.
|
If you do not access the trading account history, I recommend that you use "OnTradeTransaction": find a deal whose DEAL_ENTRY property is "DEAL_ENTRY_OUT"; The "DEAL_TIME" property is the closing time.
Thanks Vladimir.
Still trying to grasp the Deal types for MQL5.
Can I say that for DEAL_ENTRY_IN meaning opening of a ticket (in MQL4 sense) while DEAL_ENTRY_OUT is closing of a ticket?
Of course there is.
|
Great info, thanks whroeder1.
Unfortunately, using this method I can't seems to get the right OrderCloseTime.
for(int i=0; i<OrdersTotal(); i++) { if(OrderSelect(i,SELECT_BY_TICKET)>0 ) { Print("Ticket: " + OrderTicket()); Print("OrderCloseTime: " + OrderCloseTime()); } }
Thanks Vladimir.
Still trying to grasp the Deal types for MQL5.
Can I say that for DEAL_ENTRY_IN meaning opening of a ticket (in MQL4 sense) while DEAL_ENTRY_OUT is closing of a ticket?
All these situations are described by values from the ENUM_DEAL_ENTRY enumeration. In order to receive this information about a deal, use the HistoryDealGetInteger()function with the DEAL_ENTRY modifier.
Identifier | Description |
DEAL_ENTRY_IN | Entry in |
DEAL_ENTRY_OUT | Entry out |
DEAL_ENTRY_INOUT | Reverse |
DEAL_ENTRY_OUT_BY | Close a position by an opposite one |
Note, here it is a question of DEALS (Basic Principles)
- www.metatrader5.com
Forum on trading, automated trading systems and testing trading strategies
Any OrderCloseTime function for MQL5?
Man, 2017.07.20 04:02
Great info, thanks whroeder1.
Unfortunately, using this method I can't seems to get the right OrderCloseTime.
for(int i=0; i<OrdersTotal(); i++) { if(OrderSelect(i,SELECT_BY_TICKET)>0 ) { Print("Ticket: " + OrderTicket()); Print("OrderCloseTime: " + OrderCloseTime()); } }
cool posts , thanks for the posts and replies
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi Everyone,
Does anyone know is there any substitutes for OrderCloseTime() in MQL5?
How can achieve the similar results in MQL5 as below?
Regards,
Man