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.

failing to understand ITesterClient behavior when a strategy has been started
 Post subject: failing to understand ITesterClient behavior when a strategy has been started Post rating: 0   New post Posted: Thu 25 Jun, 2015, 19:06 
User avatar

User rating: 0
Joined: Thu 25 Jun, 2015, 17:36
Posts: 1
Location: United Kingdom,
Hi,

a n00b question:

I download a certain amount of data using an instance of ITesterClient. And then I run my strategy. My naive understanding is that ITesterClient then plays that data simulating a live feed from start date/time to end date/time. But in reality, the client keeps sending data indefinitely. I can't figure out why? is it just looping over the data set I requested?


 
 Post subject: Re: failing to understand ITesterClient behavior when a strategy has been started Post rating: 0   New post Posted: Mon 29 Jun, 2015, 12:50 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
This code set test start and end time

Calendar cal = new GregorianCalendar();
cal.setTimeInMillis(0);
cal.set(Calendar.DAY_OF_MONTH, 1);
cal.set(Calendar.YEAR, 2013);
cal.set(Calendar.MONTH, Calendar.JANUARY);
cal.set(Calendar.HOUR_OF_DAY, 0);

Calendar cal2 = new GregorianCalendar();
cal2.setTimeInMillis(0);
cal2.set(Calendar.DAY_OF_MONTH, 1);
cal2.set(Calendar.YEAR, 2015);
cal2.set(Calendar.MONTH, Calendar.APRIL);
cal2.set(Calendar.HOUR_OF_DAY, 0);

client.setDataInterval(ITesterClient.DataLoadingMethod.ALL_TICKS, cal.getTimeInMillis(), cal2.getTimeInMillis());


 

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