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.

Label not unique,how to write a try catch block ?
 Post subject: Label not unique,how to write a try catch block ? Post rating: 0   New post Posted: Mon 14 Feb, 2011, 14:58 

User rating: 0
Joined: Thu 24 Jun, 2010, 04:04
Posts: 27
com.dukascopy.api.JFException: Label not unique. (Order already exists) [EURUSD4]
at com.dukascopy.api.impl.connect.z.a(Unknown Source)
at com.dukascopy.api.impl.connect.u.submitOrder(Unknown Source)
at com.dukascopy.api.impl.connect.u.submitOrder(Unknown Source)
at com.dukascopy.api.impl.connect.u.submitOrder(Unknown Source)
at jforex.breakema7.onBar(breakema7.java:135)
at com.dukascopy.api.impl.execution.l.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at com.dukascopy.api.impl.execution.e$a.f(Unknown Source)
at com.dukascopy.api.impl.execution.e$a.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

i have read these 2 threads
https://www.dukascopy.net/swiss/english/ ... ?f=5&t=333
viewtopic.php?f=5&t=24059&view=previous

and my question is how to right a try catch block that will keep strategy running rather than stop

regards


 
 Post subject: Re: Label not unique,how to write a try catch block ? Post rating: 0   New post Posted: Wed 16 Feb, 2011, 10:16 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
You can either disable the "Stop strategies on exception" in Tools/Preferences/Advanced or put your code in a try catch block as follows:
try {
        ...
} catch (JFException e) {
   ...
}


 

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