Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

Exception thrown while running onBar method
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=85&t=53649
Page 1 of 1

Author:  patrich [ Thu 11 Feb, 2016, 19:31 ]
Post subject:  Exception thrown while running onBar method

Good day Dukascopy Support Team!!

Recently I'm constantly bugged by Java throwing exceptions in my strategy, that it
"Could not load bar for instrument...."

Quote:
2016-02-11 19:08:15.109 ERROR o$b - Exception thrown while running onBar method: Could not load bar for instrument [NZD/CHF], period [15 Mins], side [Bid], start time [2016.02.11 17:45:00 000], current bar start time [2016.02.11 18:00:00 000]
com.dukascopy.api.JFException: Could not load bar for instrument [NZD/CHF], period [15 Mins], side [Bid], start time [2016.02.11 17:45:00 000], current bar start time [2016.02.11 18:00:00 000]
at com.dukascopy.api.impl.n.a(L:236)
at com.dukascopy.api.impl.n.getBar(L:201)
at jforex.Dashboardv2.fillUpData(Dashboardv2.java:318)
at jforex.Dashboardv2.onBar(Dashboardv2.java:213)
at com.dukascopy.api.impl.execution.n.cC(L:85)
at com.dukascopy.api.impl.execution.n.call(L:63)
at com.dukascopy.api.impl.execution.n.call(L:23)
at java.util.concurrent.FutureTask.run(Unknown Source)
at com.dukascopy.api.impl.execution.g$a.f(L:904)
at com.dukascopy.api.impl.execution.g$a.run(L:926)
at java.lang.Thread.run(Unknown Source)


It happens for EUR/USD also, and GBP/USD probably (I don't remember exactly), so
it is possible that it can throw exceptions on any other pair.
This happens while I was using both demo and live versions of JForex, v2.12.32.

It's very annoying, because restarting strategy ( fortunately, it does not mess with
my account ) every couple of minutes is real pain i the lower back.

Is there any way around it, so I don't have to keep restarting it?

Regards

Marcin

Author:  Platform Support [ Fri 19 Feb, 2016, 10:39 ]
Post subject:  Re: Exception thrown while running onBar method

We are working on this problem.

Author:  Platform Support [ Fri 19 Feb, 2016, 14:33 ]
Post subject:  Re: Exception thrown while running onBar method

Can you post the way you use this method?

Author:  Jaface [ Mon 14 Mar, 2016, 06:54 ]
Post subject:  Re: Exception thrown while running onBar method

Hi Support,
It fails on this simple call
IBar prevBar = history.getBar(selectedInstrument, selectedPeriod, OfferSide.BID, 1);

Thanks,
Jaface

Author:  Platform Support [ Tue 15 Mar, 2016, 18:09 ]
Post subject:  Re: Exception thrown while running onBar method

We have fixed it. We plan to release it in the beginning of the next week.

  Page 1 of 1