Will there ever be "Positions" in MT5 Backtest Report?

 

Hi all,

maybe someone knows whether there will ever be the possibility of showing "Positions" in the backtest report?

In MT4, they were clearly listed using their Open price + time, Close price + time and their total profit/loss.
In MT5, only "Orders" and "Deals" are shown with no real connection to each other. They will just receive an incrementing Order or Deal number.

As Positions are already listed properly when exporting an account history report, I wonder why they don't show up in a backtest report as well.

Thank you in advance.

 
Eric Emmrich: maybe someone knows whether there will ever be the possibility of showing "Positions" in the backtest report? In MT4, they were clearly listed using their Open price + time, Close price + time and their total profit/loss. In MT5, only "Orders" and "Deals" are shown with no real connection to each other. They will just receive an incrementing Order or Deal number. As Positions are already listed properly when exporting an account history report, I wonder why they don't show up in a backtest report as well.

Yes, unfortunately, the MT5 Strategy Tester has never shown "positions", not even in on the screen report, allowing only "Orders", "Deals" or "Orders and Deals".

For the most part, I have lived with it, but when I really need it, I have a coded my EAs to record and output a "Positions" report, to a file. This obviously only works if you have the EA source code.

For those EA's you don't have the source, I suppose you could write a script to process a Report, reading the "Orders" and "Deals" information and reconstructing the "Positions".

I have no ideia why MetaQuotes allows one to see "Positions" on a live account history, but not in the Strategy Tester.

 
Fernando Carreiro #:

Yes, unfortunately, the MT5 Strategy Tester has never shown "positions", not even in on the screen report, allowing only "Orders", "Deals" or "Orders and Deals".

For the most part, I have lived with it, but when I really need it, I have a coded my EAs to record and out put a "Positions" report, to a file. This obviously only works if you have the EA source code.

For those EA's you don't have the source, I suppose you could write a script to process a Report, reading the "Orders" and "Deals" information and reconstructing the "Positions".

I have no ideia why MetaQuotes allows one to see "Positions" on a live account history, but not in the Strategy Tester.

Glad to see that at least I'm not the only one struggling with this. It just makes things unnecessarily complicated.

I ended up coding an indicator that records the positions for any backtest. However, it only works during visual backtesting which takes a very long time and is unhandy for my use cases.

 
Fernando Carreiro #:

Yes, unfortunately, the MT5 Strategy Tester has never shown "positions", not even in on the screen report, allowing only "Orders", "Deals" or "Orders and Deals".

For the most part, I have lived with it, but when I really need it, I have a coded my EAs to record and output a "Positions" report, to a file. This obviously only works if you have the EA source code.

For those EA's you don't have the source, I suppose you could write a script to process a Report, reading the "Orders" and "Deals" information and reconstructing the "Positions".

I have no ideia why MetaQuotes allows one to see "Positions" on a live account history, but not in the Strategy Tester.

If EA opens grid of orders with same qty, it become difficult to reconstruct "Orders" and "Deals" to "Positions". It is not clear exactly which order was closed.

 
Eric Emmrich #:

Glad to see that at least I'm not the only one struggling with this. It just makes things unnecessarily complicated.

I ended up coding an indicator that records the positions for any backtest. However, it only works during visual backtesting which takes a very long time and is unhandy for my use cases.

I've same issue and looking for any solutions. I was going to write indicator to export deals+orders to positions myself, but I've found this topic in time. Could you please share your indicator code?

 
Denis Kislicyn #:

I've same issue and looking for any solutions. I was going to write indicator to export deals+orders to positions myself, but I've found this topic in time. Could you please share your indicator code?

See this thread to understand how to match deals, orders and positions.


You need to adapt it to history processing, but that's how it is possible.
 
Dominik Egert #:
See this thread to understand how to match deals, orders and positions.


You need to adapt it to history processing, but that's how it is possible.
Thank you very much. I completely understand the relationship between positions, orders, and trades. I just noted that, in general, it is not possible to fully reconstruct positions from the tester's report (HTML or XML). There is no direct link to the position for every line. If you're writing your own indicator, of course, it's possible to do so. But a significant drawback of this approach is that you'll only be able to test in visual mode.
 
@Denis Kislicyn #: Thank you very much. I completely understand the relationship between positions, orders, and trades. I just noted that, in general, it is not possible to fully reconstruct positions from the tester's report (HTML or XML). There is no direct link to the position for every line. If you're writing your own indicator, of course, it's possible to do so. But a significant drawback of this approach is that you'll only be able to test in visual mode.

For "hedging" account types, every "in" order will produce a new position (and they will also have the same ticket number), so it is totally possible to reconstruct positions from the strategy tester report.

The "out" orders will be closing of positions (full or partial) or their stops (S/L and T/P) being triggered.