Hi, support! ^Codes: if (cA < 0) { try { order_short = submitOrder(getlots(), OrderCommand.SELL, slippage); order_short.waitForUpdate(10000, FILLED); cA = 0; } catch (JFException e) { } } ^Operational environment: History Back Testor. EURUSD,M15,Last 6 Months. ^Result: The console print info just as below: com.dukascopy.api.JFException: state is CLOSED at com.dukascopy.dds2.greed.agent.strategy.tester.cc.a(Unknown Source) at com.dukascopy.dds2.greed.agent.strategy.tester.w.a(Unknown Source) at com.dukascopy.dds2.greed.agent.strategy.tester.ba.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.dukascopy.dds2.greed.agent.strategy.tester.aw.a(Unknown Source) at com.dukascopy.dds2.greed.agent.strategy.tester.cc.waitForUpdate(Unknown Source) at com.dukascopy.dds2.greed.agent.strategy.tester.cc.waitForUpdate(Unknown Source) at clientsprograms.AccStrategy.onTick(AccStrategy.java:103) at com.dukascopy.dds2.greed.agent.strategy.tester.b.a(Unknown Source) at com.dukascopy.dds2.greed.agent.strategy.tester.w.run(Unknown Source) at com.dukascopy.dds2.greed.agent.strategy.tester.b.a(Unknown Source) at com.dukascopy.dds2.greed.actions.servicesources.StrategyTesterAction.Fh(Unknown Source) at com.dukascopy.dds2.greed.actions.servicesources.StrategyTesterAction.EA(Unknown Source) at com.dukascopy.dds2.greed.actions.c.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
^PS: In "submitOrder(...)" method, there are some codes to set sl/tp with the order which was submited. So, it is too near that makes the order to be closed by sl/tp instantly after it was submited. The problem is that I try to catch the JFException in codes, but it still appears.
|