In my demo account i run two strategies. The strategies are the same only with one difference: it works on different instruments (EURUSD, EURGBP). The following exception occurs:
com.dukascopy.api.JFException: Could not load bar for instrument [EUR/USD], period [15 Mins], side [Bid], start time [2016.05.05 13:15:00 000], current bar start time [2016.05.05 13:30:00 000]
at com.dukascopy.api.impl.History.getHistoryBarBlocking(History.java:236)
at com.dukascopy.api.impl.History.getBar(History.java:201)
at singlejartest.StrategyEURUSD.onBar(StrategyEURUSD.java:190)
at com.dukascopy.api.impl.execution.TaskOnBar.postData(TaskOnBar.java:85)
at com.dukascopy.api.impl.execution.TaskOnBar.call(TaskOnBar.java:63)
at com.dukascopy.api.impl.execution.TaskOnBar.call(TaskOnBar.java:23)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.dukascopy.api.impl.execution.ScienceThreadPoolExecutor$Worker.runTask(ScienceThreadPoolExecutor.java:904)
at com.dukascopy.api.impl.execution.ScienceThreadPoolExecutor$Worker.run(ScienceThreadPoolExecutor.java:926)
at java.lang.Thread.run(Thread.java:745)
It is wired because this exception did not occurs every time. The strategies works for example for two days without any problem and then the exception occurs.
StrategyEURUSD.java:190:
double previousClose = history.getBar(myInstrument, Period.FIFTEEN_MINS, OfferSide.BID, 1).getClose();
I do not understand this because I only want to get the previous bar on every 15min bar. Only one thing comes to my mind why the code throw exception, maybe because of run two strategies. Please help me
