Dukascopy
 
 
Wiki JStore Search Login

GMT is not valid
 Post subject: GMT is not valid Post rating: 0   New post Posted: Sun 04 Aug, 2013, 01:31 
User avatar

User rating: 0
Joined: Wed 03 Jul, 2013, 14:08
Posts: 16
Location: BrazilBrazil
In my strategy a get this error:
00:24:01 com.dukascopy.api.JFException: Requested time interval from [1973-03-01 00:00:00:000] to [2013-08-04 00:00:00:000] GMT is not valid @ jforex.Strategy.onStart(Strategy.java:30)

To reproduce the error use the attachment.

Look I'm using IHistory.getBarStart() and getTimeOfFirstCandle()

Dukascopy Europe ver. 2.25.7
JForex API ver. 2.7.10

How to fix this?
Thanks


Attachments:
File comment: Strategy to reproduce error.
Strategy.java [1.66 KiB]
Downloaded 348 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: GMT is not valid Post rating: 0   New post Posted: Wed 07 Aug, 2013, 03:17 
User avatar

User rating: 0
Joined: Wed 03 Jul, 2013, 14:08
Posts: 16
Location: BrazilBrazil
Can anyone help me solve this?


 
 Post subject: Re: GMT is not valid Post rating: 0   New post Posted: Wed 07 Aug, 2013, 07:05 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Hi,

What do you want to do with such large database (from 1973 to 2013)?

If I am not mistaken, there is no tick data available before 2007, so there is no point in trying to get data before 2007. But I am not sure about this. And also it is a but confusing as if getTimeOfFirstCandle() returns 1973, then it should be the starting date...

I am also not sure about what the error message really trying to say. But maybe if you reduce the interval by using a much closer starting date it will work. You can get further till support (or someone else) replies with the correct solution.

Let's say start to get only last year's data. If that goes well, you could extend the interval.
SimpleDateFormat sdf;
sdf = new SimpleDateFormat("yyyy.MM.dd");
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
Date startDate = (Date)sdf.parse("2012.01.01");
firstTime = startDate.getTime();


Edit:
Alternatively you could use a different approach to get data:
You can download tick data into .csv files here.
And you can process this .csv file in a strategy as described in this wiki page.

Hope these helps a bit to get further...


 

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