Dukascopy
 
 
Wiki JStore Search Login

maximum open trades by automated strategy
 Post subject: maximum open trades by automated strategy Post rating: 0   New post Posted: Wed 27 Jul, 2016, 07:57 
User avatar

User rating: 0
Joined: Tue 09 Sep, 2014, 10:24
Posts: 9
Location: SpainSpain
I need help to schedule when activating various strategies on the remote server each strategy can be up to an open operation, eg if I have 6 strategies automated on the remote server, open for each of the active strategies operation so might be up 6 max operations open at the same time, but never more than an open operation on the same strategy.

Thank you in advance for your help


 
 Post subject: Re: maximum open trades by automated strategy Post rating: 0   New post Posted: Thu 28 Jul, 2016, 12:24 
Visual JForex expert at Dukascopy
User avatar

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

Well this is feasible but the strategy(ies) should be indeed in running status and you can implement logical triggers to start/stop/ pause whatever action you want to do.
could you please explain the operation that you intend to do ? that would help clarifying the overall idea..

Cheers


 
 Post subject: Re: maximum open trades by automated strategy Post rating: 0   New post Posted: Thu 28 Jul, 2016, 13:32 
User avatar

User rating: 0
Joined: Tue 09 Sep, 2014, 10:24
Posts: 9
Location: SpainSpain
I need perhaps to have more than 6 active strategies on the remote server, I need to keep open a single operation by strategy, that is if I have 6 active strategies the most that can be open is 6 operations, one for each strategy, I managed to work in a one direction, ie I program the following:

If there is an open position between 6 strategies if the open position is V1 (BUY_V1) strategy, then assign value "0" to the variable: Max_Pos_Open

In the example it works properly with bullish operations, such as:

If I have active 6 Strategies on the server with open positions in the V2, V3, V4 strategies strategy V1 opens a bullish position and while this open no longer open more positions although in Max_Pos_Open = 6 variable, we will assigned "0" while BUY_V1 is open.

The problem is when I add the bearish side to do the same, and it does not work, I've tried hundreds of ways and I can not make it work in both directions.

Image
Image


Attachments:
File comment: The code works correctly in this image
WorksCorrectly.png [142.92 KiB]
Downloaded 380 times
File comment: The code in this image does not work
itdoesnotwork.png [108.12 KiB]
Downloaded 352 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: maximum open trades by automated strategy Post rating: 0   New post Posted: Thu 28 Jul, 2016, 13:50 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
try to do the following instead of linking your bearish checks out of 'not equal' exit of the the bullish condition:

Image

One more detail: Generally speaking the order status sequence for an regular trade is : Created, Opened then Filled. The status opened doesn't stay valid for a market order so it may switch quickly to filled. (unless you're using pending order command)


Attachments:
tradeMessageCheck.JPG [77.43 KiB]
Downloaded 366 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: maximum open trades by automated strategy Post rating: 0   New post Posted: Thu 28 Jul, 2016, 16:28 
User avatar

User rating: 0
Joined: Tue 09 Sep, 2014, 10:24
Posts: 9
Location: SpainSpain
do that and still does not work, I tried also with all states at the same time created, opened and filled and only works me with one hand, you can advise me how I can do to do the following in another way that happen to you;

Maxima open trades at the same time between 6 active strategies: 6
Maxima open trades at the same time strategy: 1

Thanks in advance


 
 Post subject: Re: maximum open trades by automated strategy Post rating: 0   New post Posted: Fri 29 Jul, 2016, 11:43 
Visual JForex expert at Dukascopy
User avatar

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

Well if it worked at on side it will on both as I just changed the distribution of the flow. It it doesn't work this means that your single flow did not either!
In any case, I would need the strategy file to double check the other conditions that may block the execution.

Cheers


 

Jump to:  

  © 1998-2024 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