Hi! I use getProfitLossInAccountCurrency () to calulate the trading statistics, but the result is not the same as in JForex overal backtest report.
The results differs for every order present in JForex overal backtest report.
I use next piece of code do calculate the history orders profit:
java.util.List<IOrder> orders = this.context.getHistory().getOrdersHistory(this.instrument, StrategyStartTime.getTimeInMillis(), to.getTimeInMillis());
for (IOrder o : orders)
{
if( o != null && o.getLabel ().contains ("TSM_") )
{
double order_profit = o.getProfitLossInAccountCurrency ()
}
}