Hi,
I use program from Wiki page:
https://www.dukascopy.com/wiki/files/MainOpenChart.javaI just modified following lines in IStrategy.onStart method to ensure there are open orders on the chart with SL and TP limits.
IChart chart = context.getChart(instrument);
if (chart != null) {
System.out.println(chart.getFeedDescriptor() + " " + tick);
if (engine.getOrders(instrument).size()==0) {
engine.submitOrder(
"Order#" + counter++,
instrument,
IEngine.OrderCommand.BUY,
0.001,
0,
-1.0,
tick.getBid()-10*instrument.getPipValue(),
tick.getAsk()+10*instrument.getPipValue());
}
}
I attach a screenshot of chart before double click on SL line and after.
After SL line is clicked, SL disappears and exception is thrown like in initial post.
best regards,
Kurak