Dukascopy
 
 
Wiki JStore Search Login

Historical Tester not working in standalone mode
 Post subject: Historical Tester not working in standalone mode Post rating: 0   New post Posted: Fri 05 Oct, 2012, 10:32 

User rating: 1
Joined: Thu 23 Feb, 2012, 16:38
Posts: 44
The Historical Tester does not start a strategy in standalone mode
I added an empty Strategy in the attached file, which does nothing but showing a log message in the onStart-Method. This log message is not shown.

Version: 2.7.4/2.20.1


Attachments:
DummyClient.java [3.72 KiB]
Downloaded 394 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Historical Tester not working in standalone mode Post rating: 0   New post Posted: Wed 10 Oct, 2012, 15:24 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
We are investigating this. Does this problem still exist?


 
 Post subject: Re: Historical Tester not working in standalone mode Post rating: 0   New post Posted: Thu 11 Oct, 2012, 08:17 

User rating: 1
Joined: Thu 23 Feb, 2012, 16:38
Posts: 44
Yes the problem still exists. The update to 2.20.3 didn´t help.
By the way, I don´t know why this issue has been moved to the Desktop Platform subforum, as it is a problem that only occurs in standelone mode.


 
 Post subject: Re: Historical Tester not working in standalone mode Post rating: 0   New post Posted: Wed 24 Oct, 2012, 13:00 

User rating: 1
Joined: Thu 23 Feb, 2012, 16:38
Posts: 44
Is there any progress on this issue. We cannot test anything since two weeks, which is really annoying.


 
 Post subject: Re: Historical Tester not working in standalone mode Post rating: 0   New post Posted: Mon 05 Nov, 2012, 11:18 

User rating: 1
Joined: Thu 23 Feb, 2012, 16:38
Posts: 44
This Bug still exists in 2.7.5.1 / 2.21.4!


 
 Post subject: Re: Historical Tester not working in standalone mode Post rating: 0   New post Posted: Mon 05 Nov, 2012, 15:39 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
There is one error in your code. The year is not correct:
startTestDate = df.parse("20012-06-12 00:00:00");

And we have found a problem in our Historical data feed server for the period of 4 hours. We are going to fix it soon. In a meanwhile, please test using different Period testInterval.


 
 Post subject: Re: Historical Tester not working in standalone mode Post rating: 0   New post Posted: Mon 05 Nov, 2012, 16:09 

User rating: 1
Joined: Thu 23 Feb, 2012, 16:38
Posts: 44
I corrected the code-error -> no change
I did test on the following periods: FIVE_MINS, ONE_HOUR, DAILY -> no change

Additionally I get lots of exceptions during start:

ERROR a - to(2012-06-13 00:00:00:000) > last tick time (-9223372036854775808)
java.lang.IllegalArgumentException: to(2012-06-13 00:00:00:000) > last tick time (-9223372036854775808)
        at com.dukascopy.charts.data.datacache.customticks.b.me(Unknown Source)
        at com.dukascopy.charts.data.datacache.customticks.b.<init>(Unknown Source)
        at com.dukascopy.charts.data.datacache.customticks.j.<init>(Unknown Source)
        at com.dukascopy.charts.data.datacache.ah.b(Unknown Source)
        at com.dukascopy.charts.data.datacache.ah.a(Unknown Source)
        at com.dukascopy.dds2.greed.agent.strategy.tester.b.a.b(Unknown Source)
        at com.dukascopy.dds2.greed.agent.strategy.tester.b.a.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:722)


So your suggestions do not help me, I cannot test in any period.


 
 Post subject: Re: Historical Tester not working in standalone mode Post rating: 0   New post Posted: Tue 06 Nov, 2012, 08:40 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
1) The Instrument subscribtion must be before the "client.connect()"

...
Set<Instrument> instruments = new HashSet<Instrument>();
instruments.add(Instrument.AUDCAD);
client.setSubscribedInstruments(instruments);
...
client.connect(...


2) Thread.sleep(6 * 1000); must be before client.startStrategy(), otherwise strategy is started before first ticks are arrived from API/DFS


 
 Post subject: Re: Historical Tester not working in standalone mode Post rating: 0   New post Posted: Tue 06 Nov, 2012, 09:58 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
Instead of 2) you can use to following fragment of code:
//load data
LOGGER.info("Downloading data");
Future<?> future = client.downloadData(null);
//wait for downloading to complete
future.get();

This fragment must be called before the "client.startStrategy("


 
 Post subject: Re: Historical Tester not working in standalone mode Post rating: 0   New post Posted: Tue 06 Nov, 2012, 10:00 

User rating: 1
Joined: Thu 23 Feb, 2012, 16:38
Posts: 44
Ok that helped, thank you. Well something must have changed on your side than, because the code I used worked for a long time without problems.
I wished you could have told me a month earlier, about these small fixes in my code.


 

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