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.

Doubt - Strategy through Eclipse x JForex
 Post subject: Doubt - Strategy through Eclipse x JForex Post rating: 0   New post Posted: Tue 09 Nov, 2010, 20:46 

User rating: 0
Joined: Tue 09 Nov, 2010, 20:35
Posts: 3
Hi everyone, I'm glad to discover Dukascopy, it's nice to be able to program in Java for Forex.

I would like to use Eclipse IDE to program my strategies, execute them through the IDE and follow them while in progress on the JForex plataform's graphics.

So my doubts are:
1) Can I do that? Like if I programme a simple script to submit an order, compile and execute it through Eclipse, will I be able to see the order being executed on JForex plataform? I tryed it but the strategy executes through Eclipse but seems not to reflect the progress in JFOREX plataform's graphics.

2) The other thing is, everytime executing a strategy with Eclipse and being logged into JForex I get the execption:

ERROR JForexTaskManager - java.lang.NullPointerException
java.util.concurrent.ExecutionException: java.lang.NullPointerException
   at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
   at java.util.concurrent.FutureTask.get(Unknown Source)
   at com.dukascopy.api.impl.connect.JForexTaskManager.a(Unknown Source)
   at com.dukascopy.api.impl.connect.DCClientImpl.startStrategy(Unknown Source)
   at singlejartest.Main.main(Main.java:187)
Caused by: java.lang.NullPointerException
   at singlejartest.Main$1.onStart(Main.java:90)
   at com.dukascopy.api.impl.connect.d.onStart(Unknown Source)
   at com.dukascopy.api.impl.connect.j.call(Unknown Source)
   at com.dukascopy.api.impl.connect.j.call(Unknown Source)
   at com.dukascopy.api.impl.execution.c.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.f$a.a(Unknown Source)
   at com.dukascopy.api.impl.execution.f$a.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


How can I execute strategy through Eclipse and follow it's progress though the graphic?


 
 Post subject: Re: Doubt - Strategy through Eclipse x JForex Post rating: 0   New post Posted: Wed 01 Dec, 2010, 10:32 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,

You can use the IClient interface to test your strategy from the Eclipse. You will see all create orders by your strategy in the opened platform. Please change the Main class from the JForexClientLibrary package to call your strategy class. For details take a look at the following JForex Wiki page: https://www.dukascopy.com/wiki/index.php ... in_Eclipse

Do not hesitate to contact us if you have any further questions.


 

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