why does these two exceptions happen? any detail and how to debug?
05:41:47 com.dukascopy.charts.data.datacache.DataCacheException: Cannot execute request for data for instrument [EUR/USD] period [1 Min] side [Bid] from [2011.02.08 05:39:00 000] to [2011.02.08 05:39:00 000] attempt [5] @ com.dukascopy.charts.data.datacache.u.a(Unknown Source)
05:41:47 com.dukascopy.charts.data.datacache.DataCacheException: Cannot execute request for data for instrument [EUR/USD] period [1 Min] side [Bid] from [2011.02.08 05:39:00 000] to [2011.02.08 05:39:00 000] attempt [5] @ com.dukascopy.charts.data.datacache.u.a(Unknown Source)
i have written a strategy and it seems running well but just throw out exceptions stochastically as posted above . i have dig wiki and have not found information about these error. so can support team explain in detail and give me a solution ?
by the way, since any one of the two error occur ,my strategy will stop forever so can support give me another strategy B that will look after my strategy A which is supposed not to stop stochastically ,and once strategy A stop running ,B will automatically make A running on local machine?
[liyinan]
Post subject: Re: why does these two exceptions occur? any detail and how
com.dukascopy.api.JFException: Cannot close order in CREATED, CLOSED or CANCELED state, current state - [CREATED] at com.dukascopy.dds2.greed.agent.strategy.tester.an.close(Unknown Source) at jforex.breakema7.onBar(breakema7.java:147) at com.dukascopy.dds2.greed.agent.strategy.tester.o.run(Unknown Source) at com.dukascopy.dds2.greed.agent.strategy.tester.o.ww(Unknown Source) at com.dukascopy.dds2.greed.actions.StrategyTesterAction.uH(Unknown Source) at com.dukascopy.dds2.greed.actions.StrategyTesterAction.uh(Unknown Source) at com.dukascopy.dds2.greed.actions.c.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
============================================ can anyone explain this information?and give me solutions please
API Support
Post subject: Re: why does these two exceptions occur? any detail and how
Hi, You can close an order if it is in the Filled or in the Opened state. Please consider the following code:
for (IOrder order : engine.getOrders()) { if (order.getState().equals(IOrder.State.FILLED) || order.getState().equals(IOrder.State.OPENED)){ order.close(); } }