Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

How to calculate the trading statistics?
 Post subject: How to calculate the trading statistics? Post rating: 0   Post Posted: Mon 27 May, 2013, 06:41 

User rating: 0
Joined: Tue 16 Oct, 2012, 13:10
Posts: 17
Location: Russian FederationRussian Federation
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 ()
   }
}     


 
 Post subject: Re: How to calculate the trading statistics? Post rating: 0   Post Posted: Mon 27 May, 2013, 08:30 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
This will be implemented.


 
 Post subject: Re: How to calculate the trading statistics? Post rating: 0   Post Posted: Thu 30 May, 2013, 06:51 

User rating: 0
Joined: Tue 16 Oct, 2012, 13:10
Posts: 17
Location: Russian FederationRussian Federation
When this will be implemented?


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com