Dukascopy
 
 
Wiki JStore Search Login

JFOREX-3293 history.getBar IllegalArgException
 Post subject: JFOREX-3293 history.getBar IllegalArgException Post rating: 0   New post Posted: Sun 23 Oct, 2011, 20:01 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
The call

iBar = history.getBar(Instrument.GBPUSD, Period.MONTHLY, OfferSide.ASK, 1);

called from within onTick(instrument=Instrument.GBPUSD,
tick=1294704000496[2011-01-11 00:00:00.496+0000] / 1.55895 / 1.55872)

triggers the following exception:

Quote:
java.lang.IllegalArgumentException: We can work only with candle concrete numbers or with data sequence times!
at com.dukascopy.charts.data.datacache.customperiod.candle.CustomPeriodCandleLiveFeedListener.finishLoading(CustomPeriodCandleLiveFeedListener.java:264)
at com.dukascopy.charts.data.datacache.customperiod.candle.CustomPeriodCandleLoadingProgressListener.loadingFinished(CustomPeriodCandleLoadingProgressListener.java:29)
at com.dukascopy.charts.data.datacache.LoadProgressingAction$LoadingProgressWrapper.loadingFinished(LoadProgressingAction.java:36)
at com.dukascopy.charts.data.datacache.LoadDataAction.run(LoadDataAction.java:272)
at com.dukascopy.charts.data.datacache.LoadCustomPeriodDataAction.run(LoadCustomPeriodDataAction.java:98)
at com.dukascopy.charts.data.datacache.LoadDataAction.run(LoadDataAction.java:114)
at com.dukascopy.charts.data.datacache.FeedDataProvider.loadCandlesDataSynched(FeedDataProvider.java:718)
at com.dukascopy.api.impl.History.getBarsSecured(History.java:469)
at com.dukascopy.api.impl.History$10.run(History.java:441)
at com.dukascopy.api.impl.History$10.run(History.java:439)
at java.security.AccessController.doPrivileged(Native Method)
at com.dukascopy.api.impl.History.getBars(History.java:439)
at com.dukascopy.dds2.greed.agent.strategy.tester.TesterHistory.fillCacheBuffer(TesterHistory.java:165)
at com.dukascopy.dds2.greed.agent.strategy.tester.TesterHistory.getBars(TesterHistory.java:744)
at com.dukascopy.dds2.greed.agent.strategy.tester.TesterHistory.getBars(TesterHistory.java:693)
at com.dukascopy.api.impl.History.getHistoryBarBlocking(History.java:181)
at com.dukascopy.api.impl.History.getBar(History.java:151)
at singlejartest.XXXX.onTick(XXXX.java:475)


The same strategy code run from within the JForex client (JF API 2.6.38) and using the same datacache runs without any problem and exception.

Best, RR.


 
 Post subject: Re: JFOREX-3293 history.getBar IllegalArgException Post rating: 0   New post Posted: Wed 16 Nov, 2011, 21:34 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
Dear Support!

I'm very disappointed the bug is still not addressed in the new release 2.6.49.

The bug is so obvious and so easy to reproduce.
May I kindly ask you to have a look at this and provide a fix as soon as possible?
I literally can't work on the standalone api with our strategies with this major bug included.

I've done some further testing to help you locating the bug.

I've tested all basic periods with the function Period.isPeriodBasic(Period).
While in the API 2.6.38 all passed periods were handled as expected, in API 2.6.49 there are several periods that did return null, which means they are not recognized as basic periods.

here is the API-docu:
Quote:
isPeriodBasic(Period) - Static method in class com.dukascopy.api.Period
The method checks whether the passed period is basic {TICK, TEN_SECS, ONE_MIN, FIVE_MINS, TEN_MINS, FIFTEEN_MINS, THIRTY_MINS, ONE_HOUR, FOUR_HOURS, DAILY, WEEKLY, MONTHLY} If it is basic - appropriate basic period is returned If it is not basic - null is returned


The following list shows the results of isPeriodBasic calls with all periods that are listed as basic periods in the API doc:
Period.isPeriodBasic(Period.TICK) -> returns Period.TICK
Period.isPeriodBasic(Period.TEN_SECS) -> returns null
Period.isPeriodBasic(Period.ONE_MIN) -> returns Period.ONE_MIN
Period.isPeriodBasic(Period.FIVE_MINS) -> returns null
Period.isPeriodBasic(Period.TEN_MINS) -> returns null
Period.isPeriodBasic(Period.FIFTEEN_MINS) -> returns null
Period.isPeriodBasic(Period.THIRTY_MINS) -> returns null
Period.isPeriodBasic(Period.ONE_HOUR) -> returns Period.ONE_HOUR
Period.isPeriodBasic(Period.FOUR_HOURS) -> returns null
Period.isPeriodBasic(Period.DAILY) -> returns Period.DAILY
Period.isPeriodBasic(Period.WEEKLY) -> returns null
Period.isPeriodBasic(Period.MONTHLY) -> returns null

Please let me also know should you come to different results and your calls all return ok.

Looking forward to your reply,
RR.


 
 Post subject: Re: JFOREX-3293 history.getBar IllegalArgException Post rating: 0   New post Posted: Thu 17 Nov, 2011, 15:36 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
It will be fixed as soon as possible.
Thank you for the comprehension!


 
 Post subject: Re: JFOREX-3293 history.getBar IllegalArgException Post rating: 0   New post Posted: Wed 23 Nov, 2011, 12:20 
User avatar

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


 
 Post subject: Re: JFOREX-3293 history.getBar IllegalArgException Post rating: 0   New post Posted: Mon 28 Nov, 2011, 14:42 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
Great, thanks a lot for your feedback on the release number of the fix.
Are you planning to release 2.6.50 shortly?

Best, RR.


 
 Post subject: Re: JFOREX-3293 history.getBar IllegalArgException Post rating: 0   New post Posted: Tue 29 Nov, 2011, 14:33 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Working on it.


 

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