Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1063

 
secret:

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.

 
fxsaber:

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.

 
Vladimir Karputov:

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
 
Руслан Давлетов:
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.

 
Vladimir Karputov:

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.

Got it, thanks
 

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?

 
erotin:

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.

double   high  = iHigh(Symbol(),Period(),1); 

How do I know what was the bid and ask at that moment (the moment of high on the previous candle) ?

 
erotin:

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) ?

ask = high

bid = ask - спред
 
Hello! In the article "How to properly submit a product to the market" only 1 EX5-EX4 file is specified?Question? Advisor based on indicator, calculations in indicator file in advisor function iCustom(2 files), how to submit to market? Service Desk will not answer for 3 days?
Reason: