Dukascopy
 
 
Wiki JStore Search Login

JFOREX-2787 zigzag(...) Error - Index: 0, Size: 0
 Post subject: JFOREX-2787 zigzag(...) Error - Index: 0, Size: 0 Post rating: 0   New post Posted: Thu 03 Feb, 2011, 18:36 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
At 2011-02-01 00:22:48 the following call
indicators.zigzag(EUR/USD, ONE_HOUR, BID, 72, 5, 3, ALL_FLATS, 96, getStartTimeOfCurrentBar(EUR/USD, ONE_HOUR) - ONE_HOUR.getInterval(), 1);


did trigger the following error:

Quote:
Error.thrown: Index: 0, Size: 0
2011-02-01 00:22:48 ... at java.util.ArrayList.RangeCheck(Unknown Source)
2011-02-01 00:22:48 ... at java.util.ArrayList.get(Unknown Source)
2011-02-01 00:22:48 ... at com.dukascopy.api.impl.c.a(Unknown Source)
2011-02-01 00:22:48 ... at com.dukascopy.api.impl.h.u(Unknown Source)
2011-02-01 00:22:48 ... at com.dukascopy.api.impl.h.run(Unknown Source)
2011-02-01 00:22:48 ... at java.security.AccessController.doPrivileged(Native Method)
2011-02-01 00:22:48 ... at com.dukascopy.api.impl.c.getBars(Unknown Source)
2011-02-01 00:22:48 ... at com.dukascopy.api.impl.ac.b(Unknown Source)
2011-02-01 00:22:48 ... at com.dukascopy.api.impl.ac.a(Unknown Source)
2011-02-01 00:22:48 ... at com.dukascopy.api.impl.ac.calculateIndicator(Unknown Source)
2011-02-01 00:22:48 ... at com.dukascopy.api.impl.ac.zigzag(Unknown Source)
2011-02-01 00:22:48 ... at singlejartest.LFL01$JFritz$RIndicatorSet$...(LFL01.java:nnnn)
...


We didn't change anything in this particular code-segment, that is calling the zigzag-indicator for quite soem time and have used this call extensively in Live runs and backtesting scenarios without experiencing any errors.

Best, RR.


 
 Post subject: Re: JFOREX-2739 zigzag(...) Error - Index: 0, Size: 0 Post rating: 0   New post Posted: Mon 28 Feb, 2011, 08:52 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
Unfortunately we weren't able to reproduce this, does the problem persist?


 
 Post subject: Re: JFOREX-2739 zigzag(...) Error - Index: 0, Size: 0 Post rating: 0   New post Posted: Mon 28 Feb, 2011, 10:04 

User rating: -
Since last Sunday, the ZigZag Indicator (when used in a strategy) does not provide anymore realistic values on the Demo Account. Looking to the forum, it looks to me that there was an update between Saturday and Sunday which is very buggy and influence a couple of indicators (when used in a strategy).

Any advice what happened between Saturday and Sunday and when can we expect a solution or a restore?


 
 Post subject: Re: JFOREX-2739 zigzag(...) Error - Index: 0, Size: 0 Post rating: 0   New post Posted: Mon 28 Feb, 2011, 12:41 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
Could you please provide the code you use when calling ZigZag indicator?


 
 Post subject: Re: JFOREX-2739 zigzag(...) Error - Index: 0, Size: 0 Post rating: 0   New post Posted: Mon 28 Feb, 2011, 14:11 

User rating: -
Here is the code:
.....
private double [] _zigZag_lastValue;
.....
_zigZag_lastValue = indicators.zigzag (instrument, Period.ONE_MIN, OfferSide.BID, 12,5,3, Filter.ALL_FLATS, 1, bidbar.getTime(),0);

As a result I got numbers like:

Zig zag Value = [D@2cae364f

Same story within my code with the RSI Indicator.

_m1_RSI_lastBar = indicators.rsi(instrument, Period.ONE_MIN, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, 14, Filter.ALL_FLATS, 1, bidbar.getTime(),0);
_m1_RSI_previousBar = indicators.rsi(instrument, Period.ONE_MIN, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, 14, Filter.ALL_FLATS, 2, bidbar.getTime(),0);
........

chart = this.context.getChart(instrument);
chart.comment ("M1 RSI = " + _m1_RSI_lastBar[0] + "\nM5 RSI = " + _m5_RSI_lastBar[0] + "\nM10 RSI = " + _m10_RSI_lastBar[0] + "\nM15 RSI = " + _m15_RSI_lastBar[0] + "\nM30 RSI = " + _m30_RSI_lastBar[0] + "\nH1 RSI = " + _h1_RSI_lastBar[0] + "\nh4 RSI = " + _h4_RSI_lastBar[0]);


This produces after a while the following error:

com.dukascopy.api.JFException: java.lang.ArrayIndexOutOfBoundsException: 0
at hello.The_Move_V3_0.onBar(The_Move_V3_0.java:1095)
at com.dukascopy.dds2.greed.agent.strategy.tester.o.run(Unknown Source)
at com.dukascopy.dds2.greed.agent.strategy.tester.a.wI(Unknown Source)
at com.dukascopy.dds2.greed.actions.StrategyTesterAction.ve(Unknown Source)
at com.dukascopy.dds2.greed.actions.StrategyTesterAction.uD(Unknown Source)
at com.dukascopy.dds2.greed.actions.c.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at hello.The_Move_V3_0.onBar(The_Move_V3_0.java:816)
... 8 more


The code worked well over the past weeks and has not been changed. Since Sunday I get these error messages. Saturday everything was still fine in backtesting. Once again, looking to several new topics in the support forum, something has been changed from Saturday to Sunday which in influencing a couple of indicators.

Any schedule for a solution or a restore of the previous release would be helpful for my planning.

Thank you in advance and best regards

Beastmaster


 
 Post subject: Re: JFOREX-2739 zigzag(...) Error - Index: 0, Size: 0 Post rating: 0   New post Posted: Mon 28 Feb, 2011, 14:20 

User rating: -
Here is the relevant piece of code:

....
private double [] _zigZag_lastValue;
....
_zigZag_lastValue = indicators.zigzag (instrument, Period.ONE_MIN, OfferSide.BID, 12,5,3, Filter.ALL_FLATS, 1, bidbar.getTime(),0);
......

Since Sunday I get results like:

Zig zag Value = [D@451c6e37

Similar story with the RSI Indicator:

...
_m1_RSI_lastBar = indicators.rsi(instrument, Period.ONE_MIN, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, 14, Filter.ALL_FLATS, 1, bidbar.getTime(),0);
....
chart = this.context.getChart(instrument);
chart.comment ("M1 RSI = " + _m1_RSI_lastBar[0] + "\nM5 RSI = " + _m5_RSI_lastBar[0] + "\nM10 RSI = " + _m10_RSI_lastBar[0] + "\nM15 RSI = " + _m15_RSI_lastBar[0] + "\nM30 RSI = " + _m30_RSI_lastBar[0] + "\nH1 RSI = " + _h1_RSI_lastBar[0] + "\nh4 RSI = " + _h4_RSI_lastBar[0]);

This produces the following error since Sunday:

com.dukascopy.api.JFException: java.lang.ArrayIndexOutOfBoundsException: 0
at hello.The_Move_V3_0.onBar(The_Move_V3_0.java:1095)
at com.dukascopy.dds2.greed.agent.strategy.tester.o.run(Unknown Source)
at com.dukascopy.dds2.greed.agent.strategy.tester.a.wI(Unknown Source)
at com.dukascopy.dds2.greed.actions.StrategyTesterAction.ve(Unknown Source)
at com.dukascopy.dds2.greed.actions.StrategyTesterAction.uD(Unknown Source)
at com.dukascopy.dds2.greed.actions.c.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at hello.The_Move_V3_0.onBar(The_Move_V3_0.java:816)
... 8 more

Once again. Looking to several new topics in the support forum, there must have been an update between Saturday and Sunday which influences many indicators.

Any schedule for a solution or a restore of the previous version would be very welcome for my planning.

Thank you in advance and best regards

Beastmaster


 
 Post subject: Re: JFOREX-2787 zigzag(...) Error - Index: 0, Size: 0 Post rating: 0   New post Posted: Fri 04 Mar, 2011, 09:30 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
We've tested the code you gave us and haven't encountered any problems.
Please provide the detailed test case, otherwise we won't be able to reproduce this.


 
 Post subject: Re: JFOREX-2787 zigzag(...) Error - Index: 0, Size: 0 Post rating: 0   New post Posted: Sun 20 Mar, 2011, 12:09 

User rating: 0
Joined: Fri 24 Sep, 2010, 21:48
Posts: 2
Good day to all,

I´ve tried just part of code for zigzag and having the same problems on demo even live account using "console.getOut().println("_zigZag_lastValue: " + _zigZag_lastValue);"

and mentioned

"private double [] _zigZag_lastValue;
....
_zigZag_lastValue = indicators.zigzag (instrument, Period.ONE_MIN, OfferSide.BID, 12,5,3, Filter.ALL_FLATS, 1, bidBar.getTime(),0); " // difference in "B"ar !!!

- 2011-03-20 10:26:09 _zigZag_lastValue: [D@1b7815e
2011-03-20 10:26:09 _zigZag_lastValue: [D@179f4cf
...

I would like to get historical and ONLY VALID highs lows, but this way seems to be not well.


Best regards

H0nza


 

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