Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1032

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
This is the time of the trade.
I do not understand.
Not the duration, but the time of transaction.
There are no orders in the transaction list. There are two history lists in the terminal - the list of orders and the list of deals. These are the ones to look for exactly what is needed.
Read the help:
I do not understand.
A closed position has at least two orders and two trades. It is these that characterise the position. First an order and a trade to open the position, then an order and a trade to close the position. If an order in the form of a pending order can "live" for some time until a deal is executed, then a deal has no such "lifetime" at all.
OK, then how do we determine the time of opening a position that is already in the history?
By the transaction property of the ENUM_DEAL_ENTRY enumeration
DEAL_ENTRY_IN
Market entry
DEAL_ENTRY_OUT
Market exit
DEAL_ENTRY_INOUT
U-turn
DEAL_ENTRY_OUT_BY
Close counter position
By the transaction property of the ENUM_DEAL_ENTRY enumeration
DEAL_ENTRY_IN
Market entry
DEAL_ENTRY_OUT
Market exit
DEAL_ENTRY_INOUT
U-turn
DEAL_ENTRY_OUT_BY
Close counter position
There may be many entries for one position - will you give us the information bit by bit?
Find the first trade of the DEAL_ENTRY_IN position.
Okay, then how do you determine the time of opening a position that is already in history?
Read the help - it's all there, and sometimes with examples.
Ok, then how to determine the opening time of a position that is already in history?
Two options
Forum on trading, automated trading systems and testing trading strategies
OrderCloseTime Expert Advisor MQL5
fxsaber, 2018.07.06 00:49
There can be many entries for one position - are you just going to keep telling me bit by bit?
Find the first trade of the DEAL_ENTRY_IN position.
Artyom, when you ask such questions, it is 99% that it is written for the forex market and 90% that it is for the hadge account. Why to complicate a beginner's life in the beginning?