Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

How can I resolve this exception?
 Post subject: How can I resolve this exception? Post rating: 0   New post Posted: Tue 28 Sep, 2010, 04:46 

User rating: 0
Joined: Tue 28 Sep, 2010, 02:12
Posts: 6
Hi Support,

2010-09-28 11:43:34.827 INFO Main - Strategy started: 47
2010-09-28 11:43:36.019 DEBUG e - Order group update recived [10566335]
java.lang.NumberFormatException
2010-09-28 11:43:36.019 DEBUG e - Order group [10566335] is new
2010-09-28 11:43:36.019 DEBUG e - Number of orders [1]
at java.math.BigDecimal.<init>(BigDecimal.java:368)
at java.math.BigDecimal.<init>(BigDecimal.java:647)
at java.math.BigDecimal.valueOf(BigDecimal.java:993)
at com.dukascopy.charts.data.a.e.r(Unknown Source)
at com.dukascopy.charts.data.a.e.q(Unknown Source)
at com.dukascopy.api.impl.connect.DCClientImpl.a(Unknown Source)
at com.dukascopy.transport.client.a.d.execute(Unknown Source)
at com.dukascopy.transport.client.a.e.run(Unknown Source)
at com.dukascopy.transport.client.p.run(Unknown Source)


 
 Post subject: Re: How can I resolve this exception? Post rating: 0   New post Posted: Tue 28 Sep, 2010, 08:11 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
how do you get this exception? Could please describe situation? Do this exception repeats?


 
 Post subject: Re: How can I resolve this exception? Post rating: 0   New post Posted: Wed 29 Sep, 2010, 05:44 

User rating: 0
Joined: Tue 28 Sep, 2010, 02:12
Posts: 6
Hi Support,
It happened every time, Maybe caused by the wrong Packet sequence, IMO. Please take a look
Maybe exist a bug.

public void onStart(IContext context) throws JFException
{
engine = context.getEngine();
context.getIndicators();
this.console = context.getConsole();
try
{
for (Instrument instrument : context.getSubscribedInstruments())
{
IOrder order = engine.submitOrder(getLabel(instrument), instrument,
IEngine.OrderCommand.BUY, 0.001d);
console.getOut().println(order.getState().toString());
}
}
catch(Exception e)
{
console.getErr().println("<html><body><h4>" + e.getMessage() + "</h4></body></html>");
}

}


 
 Post subject: Re: How can I resolve this exception? Post rating: 0   New post Posted: Thu 30 Sep, 2010, 14:49 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
We couldn't get the exception, that you posted, with your sample. But we made improvements, which will resolve this issue. Fix will be available with next release.


 
 Post subject: Re: How can I resolve this exception? Post rating: 0   New post Posted: Fri 01 Oct, 2010, 03:31 

User rating: 0
Joined: Tue 10 Aug, 2010, 21:51
Posts: 10
Support wrote:
We couldn't get the exception, that you posted, with your sample. But we made improvements, which will resolve this issue. Fix will be available with next release.


Hi Support,
I also have been getting above exception after each order execution. Order executes properly no issues but I get this exception in console.
You said you have fixed this, so to fixed it, do I need to download latest APIs?

I don't run my strategy on JFOREX, I use plain JAVA program with JFOREX api to run the strategy.
Thanks in advance!

Rahul K.


 
 Post subject: Re: How can I resolve this exception? Post rating: 0   New post Posted: Fri 01 Oct, 2010, 09:05 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
yes you will need the latest JClientLibrary. Fix will be available with a JClient release 2.6.*


 

Jump to:  

  © 1998-2025 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