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.

Creating a custom report file
 Post subject: Creating a custom report file Post rating: 0   New post Posted: Sat 11 Dec, 2010, 15:05 

User rating: 1
Joined: Sun 05 Dec, 2010, 08:44
Posts: 21
What would be the best way to create a custom report file?

The built-in standard report is created from the tester class in the method onStop(long processId):

                    client.createReport(processId, reportFile);


I would like to create my own report with various summary statistics in CSV text format just after this.

However the problem I've come across is that I cannot access the strategy object from which I wish to retrieve variable values.

I tried using client.getStartedStrategies() which returns a Map of IDs and strategy objects, however once in the onStop method I think the strategy that had just stopped has already been removed from the Map, as I get a NullPointerException when I use the processId as the key.

So is there a way to access the strategy object from the tester class' onStop method in order to create a custom report?

Or must I create the report from within the strategy class itself? It works however I thought it would be a better design to do it from the tester class, as that is where the standard report is created from.


 
 Post subject: Re: Creating a custom report file Post rating: 0   New post Posted: Mon 13 Dec, 2010, 09:14 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,

It is not possible to create a custom report from the IClient library. You can create the create the custom report from the strategy.


 

Jump to:  

cron
  © 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