Dukascopy
 
 
Wiki JStore Search Login

Exception thrown while running onBar method
 Post subject: Exception thrown while running onBar method Post rating: 0   New post Posted: Thu 11 Feb, 2016, 19:31 
User avatar

User rating: 0
Joined: Fri 13 Dec, 2013, 17:53
Posts: 5
Location: PolandPoland
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


 
 Post subject: Re: Exception thrown while running onBar method Post rating: 0   New post Posted: Fri 19 Feb, 2016, 10:39 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1049
Location: Geneva, Switzerland
We are working on this problem.


 
 Post subject: Re: Exception thrown while running onBar method Post rating: 0   New post Posted: Fri 19 Feb, 2016, 14:33 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1049
Location: Geneva, Switzerland
Can you post the way you use this method?


 
 Post subject: Re: Exception thrown while running onBar method Post rating: 0   New post Posted: Mon 14 Mar, 2016, 06:54 
User avatar

User rating: 0
Joined: Mon 19 Mar, 2012, 17:15
Posts: 10
Hi Support,
It fails on this simple call
IBar prevBar = history.getBar(selectedInstrument, selectedPeriod, OfferSide.BID, 1);

Thanks,
Jaface


 
 Post subject: Re: Exception thrown while running onBar method Post rating: 0   New post Posted: Tue 15 Mar, 2016, 18:09 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1049
Location: Geneva, Switzerland
We have fixed it. We plan to release it in the beginning of the next week.


 

Jump to:  

cron
  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com