|
APICLIENT-90 Passed Time has to be in interval |
bunyip
|
Post subject: APICLIENT-90 Passed Time has to be in interval |
Post rating: 0
|
Posted: Thu 29 Mar, 2012, 20:22
|
|
User rating: 2
Joined: Thu 01 Mar, 2012, 17:17 Posts: 42
|
I really appreciate your help in getting this sorted out—it’s great! So I’ve moved the logic to the IRangeBarListener.onBar method, as you suggested, and when I run the resulting strategy (attached) on a 5-pip Demo chart (starting at 14:31:58 chart time today), it does indeed print out values for each bar, which is splendid! But alas there are still two problems: 1) [Moved to another topic] 2) Every 10 or 20 bars, the printout shows an error message like this: 2012-03-29 16:30:29 at java.lang.Thread.run(Unknown Source) 2012-03-29 16:30:29 at com.dukascopy.api.impl.execution.g$a.run(Unknown Source) 2012-03-29 16:30:29 at com.dukascopy.api.impl.execution.g$a.f(Unknown Source) 2012-03-29 16:30:29 at java.util.concurrent.FutureTask.run(Unknown Source) 2012-03-29 16:30:29 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 2012-03-29 16:30:29 at com.dukascopy.api.impl.execution.a.call(Unknown Source) 2012-03-29 16:30:29 at com.dukascopy.api.impl.execution.a.d.bq(Unknown Source) 2012-03-29 16:30:29 at jforex.requests.MacdEmaOnFeed2$1.onBar(MacdEmaOnFeed2.java:100) 2012-03-29 16:30:29 at com.dukascopy.api.impl.bu.calculateIndicator(Unknown Source) 2012-03-29 16:30:29 at com.dukascopy.api.impl.h.a(Unknown Source) 2012-03-29 16:30:29 at com.dukascopy.api.impl.b.b.a(Unknown Source) 2012-03-29 16:30:29 com.dukascopy.api.JFException: Passed Time [2012-03-29 16:30:36.318] has to be in interval [2007-03-30 16:01:15.688; 2012-03-29 16:30:36.217] Many many thanks, Bunyip
Attachments: |
MacdEmaOnFeed2.java [7.17 KiB]
Downloaded 400 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.
|
|
|
|
|
 |
SFXbernhard
|
Post subject: Re: JFOREX-3669 Problems retrieving history with range bars |
Post rating: 1
|
Posted: Tue 03 Apr, 2012, 10:03
|
|
User rating: 21
Joined: Thu 19 May, 2011, 20:50 Posts: 413 Location: Germany, Munich
|
I could isolated this bug. If you run the following strategy you will get the following error lines after some minutes to hours (depends on the market) in forward test. Backtest looks good. [color=#FF0000] 2012-04-03 09:01:05 at java.lang.Thread.run(Unknown Source) 2012-04-03 09:01:05 at com.dukascopy.api.impl.execution.g$a.run(Unknown Source) 2012-04-03 09:01:05 at com.dukascopy.api.impl.execution.g$a.f(Unknown Source) 2012-04-03 09:01:05 at java.util.concurrent.FutureTask.run(Unknown Source) 2012-04-03 09:01:05 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 2012-04-03 09:01:05 at com.dukascopy.api.impl.execution.a.call(Unknown Source) 2012-04-03 09:01:05 at com.dukascopy.api.impl.execution.a.d.bq(Unknown Source) 2012-04-03 09:01:05 at jforex.rangebars.RangeBarsIndicatorBug$1.onBar(RangeBarsIndicatorBug.java:55) 2012-04-03 09:01:05 at com.dukascopy.api.impl.bu.calculateIndicator(Unknown Source) 2012-04-03 09:01:05 at com.dukascopy.api.impl.bu.a(Unknown Source) 2012-04-03 09:01:05 at com.dukascopy.api.impl.bu.a(Unknown Source) 2012-04-03 09:01:05 at com.dukascopy.api.impl.cc.a(Unknown Source) 2012-04-03 09:01:05 at com.dukascopy.api.impl.bu.a(Unknown Source) 2012-04-03 09:01:05 at com.dukascopy.api.impl.bu.a(Unknown Source) 2012-04-03 09:01:05 at com.dukascopy.api.impl.h.getRangeBars(Unknown Source) 2012-04-03 09:01:05 at com.dukascopy.api.impl.b.b.a(Unknown Source) 2012-04-03 09:01:05 com.dukascopy.api.JFException: Passed Time [2012-04-03 09:01:01.250] has to be in interval [2007-03-30 16:01:15.688; 2012-04-03 09:01:01.123] [/color]
Please correct asap, I need this proper functioning. /* * This is a test programm only, do not use for trading! * It checks calculateIndicator function with a IFeedDescriptor * At current version 2.15 this throws an exception in forward test * * (c) Stash GmbH Muenchen / Germany * www.stash.de * Author: Bernhard Schicht * Email: [email protected] */
package jforex.rangebars;
import java.util.List;
import com.dukascopy.api.*; import com.dukascopy.api.feed.FeedDescriptor; import com.dukascopy.api.feed.IFeedDescriptor; import com.dukascopy.api.feed.IRangeBar; import com.dukascopy.api.feed.IRangeBarFeedListener; import com.dukascopy.api.IIndicators.AppliedPrice;
public class RangeBarsIndicatorBug implements IStrategy {
@Configurable("") public Instrument instrument = Instrument.EURUSD; @Configurable("") public OfferSide offerSide = OfferSide.BID; @Configurable("") public int priceRangePips = 2;
private IIndicators indicators; private IConsole console; private IHistory history;
@Override public void onStart(IContext context) throws JFException { indicators = context.getIndicators(); console = context.getConsole(); history = context.getHistory();
// range bar feed final IFeedDescriptor feedDescriptor = new FeedDescriptor(); feedDescriptor.setDataType(DataType.PRICE_RANGE_AGGREGATION); feedDescriptor.setOfferSide(offerSide); feedDescriptor.setInstrument(instrument); feedDescriptor.setPriceRange(PriceRange.valueOf(priceRangePips)); context.subscribeToRangeBarFeed(instrument, offerSide, PriceRange.valueOf(priceRangePips), new IRangeBarFeedListener() {
public void onBar(Instrument instrument, OfferSide offerSide, PriceRange priceRange, IRangeBar bar) { // calculate HT_TRENDLINE indicator try{ Object[] result = indicators.calculateIndicator(feedDescriptor, new OfferSide[] { OfferSide.BID }, "HT_TRENDLINE", new AppliedPrice[] { AppliedPrice.CLOSE }, new Object[] { }, 0); double value = (Double) (result[0]); console.getOut().println("rbar pips = "+priceRangePips+": "+ bar+"; HT_TRENDLINE = "+value); } catch (Exception e){ e.printStackTrace(console.getErr()); } } }); }
@Override public void onTick(Instrument instrument, ITick tick) throws JFException { }
@Override public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException { }
@Override public void onMessage(IMessage message) throws JFException { }
@Override public void onAccount(IAccount account) throws JFException { }
@Override public void onStop() throws JFException { }
}
Bug seen in JForex DEMO version Dukascopy ver. 2.15 JForex API ver. 2.6.63
Attachments: |
RangeBarsIndicatorBug.jfx [5.47 KiB]
Downloaded 422 times
|
RangeBarsIndicatorBug.java [2.91 KiB]
Downloaded 439 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.
|
|
|
|
|
 |
bunyip
|
Post subject: Re: JFOREX-3679 Passed Time has to be in interval |
Post rating: 0
|
Posted: Tue 08 May, 2012, 11:23
|
|
User rating: 2
Joined: Thu 01 Mar, 2012, 17:17 Posts: 42
|
Hi Support,
I’d really appreciate knowing when you’re likely to get round to fixing this bug. It doesn’t happen all that often, but when it does, a strategy will miss a whole bar, sometimes with disastrous consequences. Quite a few of your clients evidently use range bars, and until this is sorted out, they’ll always be working with a time bomb that can go off at any moment.
Looking forward to hearing from you,
Bunyip
|
|
|
|
 |
API Support
|
Post subject: Re: JFOREX-3679 Passed Time has to be in interval |
Post rating: 0
|
Posted: Tue 08 May, 2012, 11:43
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
It is fixed in API 2.6.67
|
|
|
|
 |
bunyip
|
Post subject: Re: JFOREX-3679 Passed Time has to be in interval |
Post rating: 0
|
Posted: Wed 23 May, 2012, 18:07
|
|
User rating: 2
Joined: Thu 01 Mar, 2012, 17:17 Posts: 42
|
I’m really sorry to say it, but this bug STILL does not seem to have been fixed, so please take this thread out of ‘Fixed Bugs’.
If I run the strategy ‘MacdEmaOnFeed5’ (see the posts on bug 3778: ‘Further feed problems’) on a 5-pip chart in the Historical Tester, any attempt to calculate an indicator from the datafeed now gives this error: ‘Passed Time [1970-01-01 00:00:00.001] has to be in interval’. For what it’s worth, I haven’t come across this problem on a Demo chart, and the passed time seems to go up by one millisecond for every successive bar in the Historical Tester.
I’d be awfully grateful if you could get this issue sorted out in the very near future. It’s over a month since I first brought it up, and the response to bug 3819 shows I’m not the only person who needs a solution.
Best regards,
Bunyip
|
|
|
|
 |
API Support
|
Post subject: Re: JFOREX-3679 Passed Time has to be in interval |
Post rating: 0
|
Posted: Wed 23 May, 2012, 18:18
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
What version have you checked?
|
|
|
|
 |
bunyip
|
Post subject: Re: JFOREX-3679 Passed Time has to be in interval |
Post rating: 0
|
Posted: Thu 24 May, 2012, 10:51
|
|
User rating: 2
Joined: Thu 01 Mar, 2012, 17:17 Posts: 42
|
Whatever was current yesterday. But the problem's still there this morning with version 2.6.69.
|
|
|
|
 |
API Support
|
Post subject: Re: JFOREX-3679 Passed Time has to be in interval |
Post rating: 0
|
Posted: Thu 14 Jun, 2012, 14:45
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
We cannot reproduce the following issue. Please provide us with detailed steps and a sample code.
|
|
|
|
 |
bunyip
|
Post subject: Re: APICLIENT-90 Passed Time has to be in interval |
Post rating: 0
|
Posted: Mon 18 Jun, 2012, 19:17
|
|
User rating: 2
Joined: Thu 01 Mar, 2012, 17:17 Posts: 42
|
As far as I can see the issue is now fixed in version 2.6.70, both using the Historical Tester and using a Demo chart.
Bravo and many many thanks!
Bunyip
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|