Dukascopy
 
 
JStore Wiki 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 to call one strategy from another strategy
 Post subject: How to call one strategy from another strategy Post rating: 0   New post Posted: Mon 26 Mar, 2012, 16:46 

User rating: 0
Joined: Mon 19 Mar, 2012, 19:01
Posts: 5
Hello Support ,
I have created Trade Trigger Strategy and Trade Management Strategy..
Is it possible to call the Trade Management Strategy from Trade Trigger Strategy..
Please advise if it is possible..
Appreciate your quick help and response..
Thx Ajay.


 
 Post subject: Re: How to call one strategy from another strategy Post rating: 0   New post Posted: Tue 27 Mar, 2012, 08:43 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 5038
See:
http://www.dukascopy.com/wiki/#Multiple ... a_strategy


 
 Post subject: Re: How to call one strategy from another strategy Post rating: 0   New post Posted: Wed 28 Mar, 2012, 16:35 

User rating: 0
Joined: Mon 19 Mar, 2012, 19:01
Posts: 5
Thanks for your email..

Can I specify the location path of my strategy .JAVA or .jfx file instead of .jar file..?
and what command I need to put for .JAVA or .jfx file instead of below from example code

************
@RequiresFullAccess
@Library("C:/temp/simple-strategies.jar")
<********

If I need to specify .jar file only then could you please tell me how to create a jarfile of a jforex strategy. Please note that my jforex strategy file is located in

C:\JForex\Strategies\Strategy.java .

Please also note that I do not know how to use Eclipse etc but I am familliar with Jforex interface only.

Appreciate your help..

Waiting for your reply...

Thx Ajay.


 
 Post subject: Re: How to call one strategy from another strategy Post rating: 0   New post Posted: Thu 29 Mar, 2012, 10:52 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 5038
There are two ways how you can possibly invoke functions from another strategy:
  1. From a strategy class file by using reflection.
  2. From a jar which contains the strategy.
The second option is more convenient, both from compilation and programming point of view.
So in either case 1. or 2. you need to compile the strategy outside the JForex platform, since in the JForex platform you can neither obtain .class nor .jar files. We strongly suggest you using an IDE for this purpose. The most popular of them is Eclipse. Have a look at the following tutorial (The 3rd section for the beginning is rather optional):
http://www.vogella.de/articles/Eclipse/article.html
And then import the Standalone API project:
http://www.dukascopy.com/wiki/#Use_in_Eclipse
And then export the jar file (see the turial's section 4.5).


 
 Post subject: Re: How to call one strategy from another strategy Post rating: 0   New post Posted: Thu 29 Mar, 2012, 12:28 

User rating: 0
Joined: Mon 19 Mar, 2012, 19:01
Posts: 5
Thanks for your email..
I have Netbeans installed on my computer, can I use Netbeans to create the .jar file. If yes, do you have any example or document which shows how to create a .jar file for a jforex strategy..

Please advise...

Thx Ajay.


 
 Post subject: Re: How to call one strategy from another strategy Post rating: 0   New post Posted: Thu 29 Mar, 2012, 13:33 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 5038
See the second post:
viewtopic.php?f=65&t=46900&p=62731


 

Jump to:  

cron
  © 1998-2011 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