Backtesting Reports for CloseBy Operations

 

Hellooo!

First, thanks for this amazing product MT5!  The EA is working perfectly in backtest and in real account!

I have been trading futures and, to avoid paying twice the spread, I am using the CloseBy Positions.  If EA wants to buy, it opens a BUY limit order with stop limit. As soon as this order is taken, it opens a SELL order instead of using target price. If SELL positions is filled, I use Closeby to close BUY and SELL. Otherwise, if stop loss is activated, I cancel the SELL order. It works great.

Now, I would like to improve backtesting. When looking to indicators like "Sharpe Ratio" and "Expected Payoff", I see the calculations considering the total trades ( both buy and sell ) :

- 6 Wins and 2 losses is counted as  13 trades and I would like it to be counted as 8 trades

Is there a way to consider Close By as one trade?

Is there a way to customize other fields ( not only "OnTester Result" ) so I could make my own calculations?


Thank you vey much

Backtest Summary

Backtest Trades