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
It's easily done, but just why?
At the end of Report.mqh there is such an entry.
To move/delete a column you need to change only this sequence in the source accordingly.
You have TurnOver calculation in your report.
I am trying to do the same, but without MT4Ordes.
As an example I found your post https://www.mql5.com/ru/forum/98421/page2#comment_2908365
One of the results: -149,96. The sign - you can remove fabs()
And for the same calculation via Report: 13,839,230.40.
And in this example the calculation is only for one symbol CalcHistorySlip( const string Symb) Well this can be solved by calling the function for each symbol.
Maybe you have an equivalent for MT5 that matches MT4Orders? If not, I will leave it as it is or will not include it in the big report at all. As it is not clear how it can help. I am now outputting the sum of volumes. For single-symbol Expert Advisors, the result of sorting by the sum of volumes and TurnOver from MT4Orders is the same. I.e. there is a replacement for TurnOver . But for multisymbol will be different. Because the sum of lots of different symbols are not equivalent in monetary terms. TurnOver would be better.
And comparison of sorting by volume with the variant for MT5 (code in the link above) does not match at all.
Maybe you have an equivalent for MT5 that matches MT4Orders?
Is that what you mean?
If not, I will leave it as it is or not include it in the big report at all. As it is not clear how it can help.
Trading turnover - how much money you grind. Normal brokers calculate commission from it.
If, for example, individual conditions are required, the first thing they will ask about is the size of the trading turnover.
Is that what you're talking about?
Trading turnover - how much money you grind. The commission is calculated from it in normal brokers.
If, for example, individual conditions are required, the first thing they will ask about is the size of the trading turnover.
I think it should be like that:
OrderLots() * TickValue * fabs(OrderOpenPrice() - OrderClosePrice())Plus it is necessary to check the symbol type, because for non-forex brokers it is necessary to calculate the cost of a tick from the base currency to the currency of the account (for forex - the cost of a tick is immediately reported in the currency of the account).
It seems like it should be:
Plus you need to check the symbol type, because for non-forex you need to calculate the tick value from the base currency to the account currency (for forex - the tick value is reported immediately in the account currency).
I copied this from Report.mqh. It also goes like this.
Report works for trading history with symbols that have not been in the Market Watch for a long time. And it has no idea whether it is Forex or something else. However, the information in the history is often enough to calculate the trade turnover.
ZY It follows from the sources that if the opening and closing prices do not coincide, the calculation follows this formula.
(OrderOpenPrice() + OrderClosePrice()) * MathAbs(OrderProfit() / ((OrderClosePrice() - OrderOpenPrice()))Is that what you're talking about?
Trading turnover - how much money you grind. The commission is calculated from it in normal brokers.
If, for example, individual conditions are required, the first thing they will ask about is the size of the trading turnover.
I have reproduced what is done in Report and wrote about it in the first post. Sorting by them coincides with sorting by just volumes.
The problem with the calculation variant without Mt4Orders.
The function https://www.mql5.com/ru/forum/98421/page2#comment_2908365 gives quite different results.
One of the results of this function: -149,96. The sign - you can remove fabs()
And for the same calculation via Report: 13,839,230.40.
Maybe you have an equivalent for MT5 matching MT4Orders?
If not, then the easiest solution is to see if a trade made via MT5 functions can be viewed in history via MT4Orders. To use this
If not, then the easiest solution is whether a trade made via MT5 functions can then be viewed in history via MT4Orders.
So that's exactly how Report.mqh works! Or am I completely misunderstanding the questions today.
Turn_Over += (OrderOpenPrice() + OrderClosePrice()) * MathAbs(OrderProfit() / ((OrderClosePrice() - OrderOpenPrice()));It can be simplified by substituting:
OrderProfit()=(OrderClosePrice()-OrderOpenPrice()) * OrderLots() * lotSize
Substitute
Delete (OrderClosePrice()-OrderOpenPrice()))
Let's find the size of 1 lot/contract:
Get lotSize for Virtual in mat mode from OrderProfit()=(OrderClosePrice()-OrderOpenPrice())) * OrderLots() * lotSize
Total for Virtual
For MT5: (this is what I wanted to get initially and it turned out to be much easier than in that example).
The results are exactly the same.
But I'm not sure if I should use SYMBOL_TRADE_CONTRACT_SIZE instead of lotSize=SYMBOL_TRADE_TICK_VALUE / SYMBOL_TRADE_TICK_SIZE;
Or is the result the same in theory? In practice with a simple one character example, yes.
Total for Virtual
I.e. we got what we originally wrote.
I'm not sure if you should use SYMBOL_TRADE_CONTRACT_SIZE instead of lotSize=SYMBOL_TRADE_TICK_VALUE / SYMBOL_TRADE_TICK_SIZE;
Or is the result the same in theory? In practice with a simple example with a single symbol, yes.
The symbol may not be in the Market Watch.