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.

Multiple Strategy
 Post subject: Multiple Strategy Post rating: 0   New post Posted: Sun 07 Dec, 2014, 18:22 

User rating: 0
Joined: Wed 13 Jul, 2011, 17:59
Posts: 17
Location: United States,
HI
how to call another strategy while running different one
I want to run Strategy 1 then Strategy 2 and 3


 
 Post subject: Re: Multiple Strategy Post rating: 0   New post Posted: Sun 07 Dec, 2014, 21:16 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Please be more specific.
-Do you want to automate strategy execution of Strategy2 when Strategy1 is stopped?
-Do you want to start Strategy2 while strategy1 is running, and you want to start Strategy2 from Strategy1 when some conditions are met?
-Do you want to manually start your strategies?
-Do you want to start your strategies not from within each other, but from the command line?


 
 Post subject: Re: Multiple Strategy Post rating: 0   New post Posted: Sun 07 Dec, 2014, 21:40 

User rating: 0
Joined: Wed 13 Jul, 2011, 17:59
Posts: 17
Location: United States,
Quote:
-Do you want to start Strategy2 while strategy1 is running, and you want to start Strategy2 from Strategy1 when some conditions are met?

Exactly My Friend ..


 
 Post subject: Re: Multiple Strategy Post rating: 0   New post Posted: Mon 08 Dec, 2014, 08:37 
User avatar

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

See examples in wiki: https://www.dukascopy.com/wiki/#Multiple ... a_strategy


 
 Post subject: Re: Multiple Strategy Post rating: 0   New post Posted: Thu 11 Dec, 2014, 00:03 

User rating: 0
Joined: Wed 13 Jul, 2011, 17:59
Posts: 17
Location: United States,
Thanks
If I wanted to call another Strategy to start when the main one start
will this be ok ?
 strategy.onStart(MyStrategy)


 
 Post subject: Re: Multiple Strategy Post rating: 0   New post Posted: Thu 11 Dec, 2014, 07:25 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
New_Student wrote:
Thanks
If I wanted to call another Strategy to start when the main one start
will this be ok ?
 strategy.onStart(MyStrategy)


If you can master standalone API programming you can
run multiple concurrent strategies, and then selectively
enable the one you want (you know, have some kind of
"disable" flag for the ones that should "sleep") but then
that would be "serious" programming, but are you up
for it ? HyperScalper


 
 Post subject: Re: Multiple Strategy Post rating: 0   New post Posted: Thu 11 Dec, 2014, 19:01 

User rating: 0
Joined: Wed 13 Jul, 2011, 17:59
Posts: 17
Location: United States,
actually I dont intend to do that
to make it sample ..Consider I have 3 Strategy(A1,A2,A3) and I want to make a new one (ST New) which get some values from those 3
so instead of ruining those three one by one and insert the conditions for each one
The Main strategy (ST NEW) Should Have the new conditions and according to that make the order :lol:


 
 Post subject: Re: Multiple Strategy Post rating: 0   New post Posted: Sat 13 Dec, 2014, 03:00 

User rating: 0
Joined: Wed 13 Jul, 2011, 17:59
Posts: 17
Location: United States,
HI again
1- Consider I have a string on Strategy 1 ,, how can I make strategy 2 read that string value ?
2- if I have two strategy running at the same time with the same variables name .. will they get the same result if any of the strategy variable get a value ?


 
 Post subject: Re: Multiple Strategy Post rating: 0   New post Posted: Mon 15 Dec, 2014, 08:48 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
1. You can make a setter method in Strategy2 and pass String value to Strategy2 when it's received by Strategy1. Just as passing tick/bar/message values in wiki examples above.
2. No.

As these are Java questions, consider reading basic tutorials here: https://docs.oracle.com/javase/tutorial/


 

Jump to:  

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