Questions from Beginners MQL5 MT5 MetaTrader 5 - page 698

 
Dmitry Melnichenko:
But if a position was opened yesterday and closed today, the history will show a Trade with the opening time today, it just closes yesterday's position! Or am I wrong?
You need to collect trades in the history of trades in position by DEAL_POSITION_ID. If you can not, a little later whistle, I will build an example.
 
Vladimir Karputov:
You need to collect the trades in the position history by DEAL_POSITION_ID. If you can't, whistle a bit later, I'll build an example.

Vladimir, I have this thought/idea...

Is there a possibility to add examples posted in this branch in response to questions on MQL5 commands into documentation? That would be very handy.

 
Vladimir Karputov:
In the history of deals you need to collect trades in position by DEAL_POSITION_ID. If you can not, whistle later, I will build an example.

I mean:

Select deal IN(today), find deal OUT in the history, compare DEAL_POSITION_ID, if they are the same then calculate the profit?

Have I got it right?

 
Dmitry Melnichenko:

I mean:

Select deal IN(today), find deal OUT in the history, compare DEAL_POSITION_ID, if they are the same then calculate the profit?

I have correctly understood?

In the general case, we need to summarize all deals of the OUT type for eachDEAL_POSITION_ID.

 
Vladimir Karputov:

In general, it is necessary to summarise all transactions of type OUT for eachDEAL_POSITION_ID.

I got it, thanks for the help
 
Comments not relevant to this topic have been moved to "Here's a created expert give feedback".
 

Is it possible to select objects and move them in the tester in MT5? It was possible in 4, but it is not possible in 5...

 

how to prescribe the following :

If the price has changed by 1%

 
Movlat Baghiyev:

how to prescribe the following :

If the price has changed by 1%

Set which price corresponds to 100% and calculate.
 
Vitalie Postolache:
Determine which price corresponds to 0% and which corresponds to 100% and calculate.
In MQL4 code of interest ...