Dukascopy
 
 
Wiki JStore Search Login

Multiple strategies running and open just ONE position
 Post subject: Multiple strategies running and open just ONE position Post rating: 0   New post Posted: Fri 03 Mar, 2017, 11:23 
User avatar

User rating: 1
Joined: Fri 11 May, 2012, 12:05
Posts: 12
Location: Romania, Iasi
Hello,

I want to run more strategies at the same time and I want the strategy to open just ONE position when the conditions are met.
Because this problem is so annoying I added a STOP STRATEGY block after the buy/sell order. It still opens more positions!

My observations while testing the strategy real time on a demo account:
If the market is ticking slowly it will open only one position. However if the market is very active there is a DELAY between sending the first market order and stopping the strategy. So if there are more ticks per second the strategy will open more positions then it will stop itself. I guess it could work to use the strategy on CANDLES and not ON TICKS but it will be a random entry since I don't know where the price will be in 10 seconds.

I can not use the "All Positions =0" block because if there is another position opened on another instrument the strategy will not work. So I can't use more strategies either with this approach.

I really want to make this work. I want more strategies running simultaneously and managing the positions independently and each strategy to have only ONE position opened.
Another problem is that the testing takes a lot of time because it works most of the time and it opens just one position.
Please help. Any work around is welcomed. Thank you.


Attachments:
A6_B.java [15.97 KiB]
Downloaded 138 times
A6_B.jfx [21.04 KiB]
Downloaded 137 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Multiple strategies running and open just ONE position Post rating: 1   New post Posted: Fri 03 Mar, 2017, 15:37 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

I would need to see the vfs file in order to check your implemented logic especially when it comes to your observations.
I've made an example that open positions and closes them based on simple condition without using a generic condition that restricts other strategy instances. Maybe this would help you to create another workflow or at least put you on a another path ..
Let me know if I missed something ..
Cheers


Attachments:
Workaround_MultiCurrenciesOnTick.vfs [33.24 KiB]
Downloaded 177 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Multiple strategies running and open just ONE position Post rating: 1   New post Posted: Fri 03 Mar, 2017, 17:29 
User avatar

User rating: 1
Joined: Fri 11 May, 2012, 12:05
Posts: 12
Location: Romania, Iasi
I uploaded the wrong file by mistake, I thought it's .vfs.
I'll take a look at your suggestion.
Thank you.


Attachments:
A6_B.vfs [39.77 KiB]
Downloaded 151 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 

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