Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1063
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
To calculate the profit of a trade, the opening price in particular is needed. As long as the trade is open, the opening price must be taken from the list of positions on the position ticket.
It is not necessary. You can also take it from HistoryDeals. On a hedge, it will be in one step, on the netting - in several steps.
And when the deal is closed, then the same open price has to be taken from another list (of deals, not positions) for another ticket. Right?
There are only HistoryDeals.
And if you also need to calculate the slippage values at opening and closing, then you have to connect more HistoryOrders.
When I want to see the trading history in the terminal, I use the GUI extension. There are historical positions, like in MT4. Closing prices correspond to closing times, etc.
Therefore, the historical positions are a convention that can be interpreted in different ways.In the screenshot you can see that MT5 shows that position has a profit of 0.71 and a close price curve (1.131878 is more digits than Digits and this price is not equal to symbol price at close time).
The GUI extension, on the other hand, shows that this position consisted of two positions closed at different times. And the profit of one was -0.09, and the other was +0.80. Which results in the same 0.71. And the closing prices correspond to the closing times. Just like in MT4, in general.
Which presentation of historical MT5 positions is clearer is up to everyone.
Do you have open source code of this EA (you need *.mq5 file)?
If you have it and can put it in the public domain - just post this file in this thread. I think you will get help at once. But only if there is an open code (*.mq5 file).
No code, it is in *.EX4 format
In that case you are walking on a razor's edge. For any, even a hint of decompiling, you and those who take it up will be banned for life.
Also look in which thread you are writing - this forum is dedicated to MQL5. For the old terminal there is a special section:MQL4 and MetaTrader 4.
In that case you are walking on a razor's edge. For any, even a hint of decompiling, you and those who take it up will be banned for life.
Also look in which thread you are writing - this forum is dedicated to MQL5. For the old terminal there is a special section:MQL4 and MetaTrader 4.
Searched everything, couldn't find anything.
Question about system processes in task manager -
How do I catch calc.exe process appearing and wait for it to finish?
Searched everything, couldn't find anything.
Question on the system processes in the task manager -
How do you catch calc.exe process appearing and wait for it to finish?
Are you sure you have the right forum?
No. I'm trying to wait until the auto-optimisation process is complete from the EA.
Another question.
How do I know what was the bid and ask at that moment (the moment of high on the previous candle) ?
No. I'm trying to wait until the auto-optimisation process is complete from the EA.
Another question.
How do I know what was the bid and ask at that moment (the moment of the high on the previous candle) ?