|
JFOREX-2162 tester "t"o parameter can't be greater |
[brainstom]
|
Post subject: JFOREX-2162 tester "t"o parameter can't be greater |
Post rating: 0
|
Posted: Wed 18 Aug, 2010, 17:38
|
|
User rating: 0
Joined: Tue 10 Nov, 2009, 16:58 Posts: 65
|
Note: this is when using ITesterClient, with JForex api 2.6.12 Consider the following code, executed in OnBar(): m_ichimoku[mPeriod] = indicators.calculateIndicator(instrument, mpPeriod, mOfferSide, indicatorName, null, mInputParams, Filter.ALL_FLATS, 27 + SENKOU_PAST, // we will get current plus 26 bars. askBar.getTime(), 0); SENKOU_PAST is 40, indicatorName is "ICHIMOKU" When testing with ITesterClient, I get the following occasionally: Strategy tester: com.dukascopy.api.JFException: "to" parameter can't be greater than time of the last formed bar for this instrument @ distributedTester.PchannelBreakSimple.updateIchimokus(PchannelBreakSimple.java:635) "to" parameter can't be greater than time of the last formed bar for this instrument: 2010-08-18 17:55:21.318 ERROR TesterClientImpl$b - Exception thrown while running onBar method: "to" parameter can't be greater than time of the last formed bar for this instrument com.dukascopy.api.JFException: "to" parameter can't be greater than time of the last formed bar for this instrument at com.dukascopy.dds2.greed.agent.strategy.tester.b.getBars(Unknown Source) at com.dukascopy.api.impl.b.a(Unknown Source) at com.dukascopy.api.impl.b.calculateIndicator(Unknown Source) at com.dukascopy.dds2.greed.agent.strategy.tester.ao.calculateIndicator(Unknown Source) at distributedTester.PchannelBreakSimple.updateIchimokus(PchannelBreakSimple.java:635) at distributedTester.PchannelBreakSimple.onBar(PchannelBreakSimple.java:447) at com.dukascopy.dds2.greed.agent.strategy.tester.t.run(Unknown Source) at java.lang.Thread.run(Thread.java:637)
if you look at the parameters used, we are not referring to bars after the currently formed bar... so what gives ???
|
|
|
|
 |
API Support
|
Post subject: Re: JFOREX-2162 tester "t"o parameter can't be greater |
Post rating: 0
|
Posted: Tue 24 Aug, 2010, 14:08
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Hi, We have tested the similar code using ITesterClient: int SENKOU_PAST = 1; Object[] ichimokuIndicator = indicators.calculateIndicator(instrument, period, new OfferSide[] {OfferSide.BID}, "ICHIMOKU", null, new Object[]{13, 8, 5},Filter.ALL_FLATS, 27 + SENKOU_PAST ,askBar.getTime(),0);
The code above works without exception. Please check your variable initialization, because JFException: "to" parameter can't be greater than time of the last formed bar... means that you use incorrect time for indicator.
|
|
|
|
 |
[brainstom]
|
Post subject: Re: JFOREX-2162 tester "t"o parameter can't be greater |
Post rating: 0
|
Posted: Mon 30 Aug, 2010, 08:37
|
|
User rating: 0
Joined: Tue 10 Nov, 2009, 16:58 Posts: 65
|
Support wrote: Hi, We have tested the similar code using ITesterClient: int SENKOU_PAST = 1; Object[] ichimokuIndicator = indicators.calculateIndicator(instrument, period, new OfferSide[] {OfferSide.BID}, "ICHIMOKU", null, new Object[]{13, 8, 5},Filter.ALL_FLATS, 27 + SENKOU_PAST ,askBar.getTime(),0);
The code above works without exception. Please check your variable initialization, because JFException: "to" parameter can't be greater than time of the last formed bar... means that you use incorrect time for indicator. this is the calculateIndicators that does not have a "to" specified. look at the parameter set. So I fail to see how "to" could be specified wrong. Also, the initial time is set as the bar we just got, in onBar() so obviously it already happened so the time can only be in the past (slightly), and the bars requested after that time is 0 so I am really puzzled how and what that message means in this case...
|
|
|
|
 |
mikakun
|
Post subject: Re: JFOREX-2162 tester "t"o parameter can't be greater |
Post rating: 0
|
Posted: Fri 20 Sep, 2013, 14:38
|
|
User rating: 0
Joined: Sun 04 Aug, 2013, 10:16 Posts: 48 Location: FranceFrance
|
getting this same error while running historical test strategy was working fine 2 days ago (and was not modified whatsoever, jforex client was updated) double [][] dmifiltred=this.indicators.dmi(this.selectedInstrument,this.dmiPeriod,OfferSide.ASK,14, Filter.ALL_FLATS, 1, askBar.getTime(), 0);
|
|
|
|
 |
mikakun
|
Post subject: Re: JFOREX-2162 tester "t"o parameter can't be greater |
Post rating: 0
|
Posted: Fri 20 Sep, 2013, 14:47
|
|
User rating: 0
Joined: Sun 04 Aug, 2013, 10:16 Posts: 48 Location: FranceFrance
|
nb : error is thrown if setting the tester to test on ticks, if tester is set to test on a period @ ohlc error is not thrown
(but need to test ontick this strategy & was testing on ticks this strategy 2 days ago & tester was not throwing errors - my code is in onbar event not ontick event)
|
|
|
|
 |
mikakun
|
Post subject: Re: JFOREX-2162 tester "t"o parameter can't be greater |
Post rating: 0
|
Posted: Fri 20 Sep, 2013, 15:24
|
|
User rating: 0
Joined: Sun 04 Aug, 2013, 10:16 Posts: 48 Location: FranceFrance
|
nb2 : actually, it seems the error is thrown only by the ticks during the first dmiperiod being tested
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|