Dukascopy
 
 
Wiki JStore Search Login

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

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

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

Data cache file corrupted
 Post subject: Data cache file corrupted Post rating: 0   Post Posted: Wed 27 Nov, 2013, 20:01 
User avatar

User rating: 1
Joined: Tue 01 May, 2012, 22:05
Posts: 17
Location: United Kingdom, London
Hello,

I recently start getting this Exception. What could be the cause? I already deleted all the cache file.

16:47:57 com.dukascopy.charts.data.datacache.DataCacheException: Data cache file corrupted, candle time [2013.11.01 00:00:00 000],expected candle time [2013.11.09 05:00:00 000], file [C:\Users\User\Local Settings\JForex\.cache\EURUSD\intraperiod\2013_11_01_00_ASK_candles_hour_1.bi5], position in file [10750] @ jforex.Strategy1.onTick(Stratergy1.java:1246)


 
 Post subject: Re: Data cache file corrupted Post rating: 0   Post Posted: Wed 27 Nov, 2013, 23:02 
User avatar

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

It is much easier to investigate if you show the line that caused the exception.
It is even better if you provide the complete strategy that causes the issue. If that is confidential, at least show some part of the strategy.


 
 Post subject: Re: Data cache file corrupted Post rating: 0   Post Posted: Thu 28 Nov, 2013, 01:46 
User avatar

User rating: 1
Joined: Tue 01 May, 2012, 22:05
Posts: 17
Location: United Kingdom, London
Hi,

Line 1246: @Override
Line 1247: public void onTick(Instrument instrument, ITick tick) throws JFException {

The code inside onTick method:
       for (IStrategy strategy : strategies) {
          strategy.onTick(instrument, tick);
        }


Normally if a strategy from strategies would throw an exception the error line would be (Stratergy1.java:1249).


 
 Post subject: Re: Data cache file corrupted Post rating: 0   Post Posted: Thu 28 Nov, 2013, 12:17 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Does the problem persist after cleaning the data cache?


 
 Post subject: Re: Data cache file corrupted Post rating: 0   Post Posted: Thu 28 Nov, 2013, 13:22 
User avatar

User rating: 1
Joined: Tue 01 May, 2012, 22:05
Posts: 17
Location: United Kingdom, London
Yes,

I deleted all the cache files last weekend. I deleted over 5GB of cache files.
I just checked the cache folder and again it's over 5GB.
Is it normal that the cache folder uses so much space?


 
 Post subject: Re: Data cache file corrupted Post rating: 0   Post Posted: Thu 28 Nov, 2013, 13:33 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
StephanePaulus wrote:
Is it normal that the cache folder uses so much space?
It depends how many instruments you normally use and over what periods you do back-test. Say you back-test over 5 years on EUR/USD, assuming that there is one tick per second there will be at least 10 million ticks over that period. Assume you use 9 more instruments in a similar way - there will 100 million ticks in your cache.


 
 Post subject: Re: Data cache file corrupted Post rating: 0   Post Posted: Thu 28 Nov, 2013, 14:11 
User avatar

User rating: 1
Joined: Tue 01 May, 2012, 22:05
Posts: 17
Location: United Kingdom, London
Ok,

However I still haven't got any suggestions on what the problem could be, that causes the corrupt data cache file.

I never did a back-test on the PC that is running the strategy. I only use 5 instruments.


 
 Post subject: Re: Data cache file corrupted Post rating: 0   Post Posted: Fri 29 Nov, 2013, 20:00 
User avatar

User rating: 1
Joined: Tue 01 May, 2012, 22:05
Posts: 17
Location: United Kingdom, London
23:14:23 com.dukascopy.charts.data.datacache.DataCacheException: Data cache file corrupted, candle time [2013.11.01 20:00:00 000],expected candle time [2013.11.14 05:00:00 000], file [C:\Users\User\Local Settings\JForex\.cache\EURUSD\intraperiod\2013_11_01_00_ASK_candles_hour_1.bi5], position in file [750] @ jforex.Strategy.onTick(Strategy.java:1246)
On 2013-11-27
14:36:26 com.dukascopy.charts.data.datacache.DataCacheException: Data cache file corrupted, candle time [2013.11.08 09:00:00 000],expected candle time [2013.11.07 23:00:00 000], file [C:\Users\User\Local Settings\JForex\.cache\EURUSD\intraperiod\2013_11_01_00_ASK_candles_hour_1.bi5], position in file [4425] @ jforex.Strategy.onTick(Strategy.java:1246)
On 2013-11-28
14:36:26 com.dukascopy.charts.data.datacache.DataCacheException: Data cache file corrupted, candle time [2013.11.07 23:00:00 000],expected candle time [2013.11.07 06:00:00 000], file [C:\Users\User\Local Settings\JForex\.cache\EURUSD\intraperiod\2013_11_01_00_ASK_candles_hour_1.bi5], position in file [4425] @ jforex.Strategy.onTick(Strategy.java:1249)
On 2013-11-28
08:50:01 com.dukascopy.charts.data.datacache.DataCacheException: Data cache file corrupted, candle time [2013.11.08 09:00:00 000],expected candle time [2013.11.07 23:00:00 000], file [C:\Users\User\Local Settings\JForex\.cache\EURUSD\intraperiod\2013_11_01_00_ASK_candles_hour_1.bi5], position in file [4425] @ jforex.Strategy.onTick(Strategy.java:1246)
On 2013-11-29
10:01:32 com.dukascopy.charts.data.datacache.DataCacheException: Data cache file corrupted, candle time [2013.11.01 10:00:00 000],expected candle time [2013.11.17 23:00:00 000], file [C:\Users\User\Local Settings\JForex\.cache\EURUSD\intraperiod\2013_11_01_00_ASK_candles_hour_1.bi5], position in file [500] @ jforex.Strategy.onTick(Strategy.java:1246)
On 2013-11-29

These are the errors I got this week. They only occur on "\EURUSD\intraperiod\2013_11_01_00_ASK_candles_hour_1.bi5", same strategy is running on 4 other Instruments without these errors.


 
 Post subject: Re: Data cache file corrupted Post rating: 0   Post Posted: Mon 27 Jan, 2014, 09:56 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please provide an example strategy which replicates the case. Please provide a print-screen of you Historical Tester settings.


 

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