Dukascopy
 
 
Wiki JStore Search Login

Multiple Orders Generated
 Post subject: Multiple Orders Generated Post rating: 0   New post Posted: Thu 25 Jun, 2015, 16:58 
User avatar

User rating: 0
Joined: Fri 23 Aug, 2013, 17:49
Posts: 27
Can anyone explain why I am getting multiple orders generated from this code?

I want three separate orders generated, instead I get nine.


Attachments:
ZZZLWMAcross022a.vfs [95.59 KiB]
Downloaded 152 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 Orders Generated Post rating: 0   New post Posted: Thu 25 Jun, 2015, 20:08 
User avatar

User rating: 1
Joined: Thu 11 Jun, 2015, 11:47
Posts: 6
Location: Slovenia, Ljubljana
revoli wrote:
Can anyone explain why I am getting multiple orders generated from this code?

I want three separate orders generated, instead I get nine.


Hi revoli

The Open Positions.Positions Amount in Position Info folder variable return the number of open positions.
So before you open new position check if Open Positions.Positions Amount is less than 3.


 
 Post subject: Re: Multiple Orders Generated Post rating: 0   New post Posted: Fri 26 Jun, 2015, 08:17 
User avatar

User rating: 0
Joined: Fri 23 Aug, 2013, 17:49
Posts: 27
Gorazd_Jernejc wrote:
revoli wrote:
Can anyone explain why I am getting multiple orders generated from this code?

I want three separate orders generated, instead I get nine.


Hi revoli

The Open Positions.Positions Amount in Position Info folder variable return the number of open positions.
So before you open new position check if Open Positions.Positions Amount is less than 3.



Thats useful to know thanks. Is there anywhere where this information can be found? I have not found any documentation that describes the variables parameters. In the strategy I am already checking this but it does not seem to stop multiple positions opening. They all open in the same bar so I need something that says do this once only per bar.


 
 Post subject: Re: Multiple Orders Generated Post rating: 0   New post Posted: Fri 26 Jun, 2015, 08:45 
User avatar

User rating: 1
Joined: Thu 11 Jun, 2015, 11:47
Posts: 6
Location: Slovenia, Ljubljana
revoli wrote:
Thats useful to know thanks. Is there anywhere where this information can be found? I have not found any documentation that describes the variables parameters.

Hi

Use Visual JF Help... :roll:
And you should find: https://www.dukascopy.com/vfhelper/articleView.action?id=414&dataId=418&familyKey=Data+Type&request_locale=EN
The help says: "The collection of positions has the amount of position, the Integer data."


 
 Post subject: Re: Multiple Orders Generated Post rating: 0   New post Posted: Fri 26 Jun, 2015, 08:49 
User avatar

User rating: 0
Joined: Fri 23 Aug, 2013, 17:49
Posts: 27
Gorazd_Jernejc wrote:
revoli wrote:
Thats useful to know thanks. Is there anywhere where this information can be found? I have not found any documentation that describes the variables parameters.

Hi

Use Visual JF Help... :roll:
And you should find: https://www.dukascopy.com/vfhelper/articleView.action?id=414&dataId=418&familyKey=Data+Type&request_locale=EN
The help says: "The collection of positions has the amount of position, the Integer data."



I am already checking this in the strategy but it is not stopping multiple positions. They all open in the same bar so I need something that says do this once per bar.

Thanks


 
 Post subject: Re: Multiple Orders Generated Post rating: 0   New post Posted: Fri 26 Jun, 2015, 09:02 
User avatar

User rating: 1
Joined: Thu 11 Jun, 2015, 11:47
Posts: 6
Location: Slovenia, Ljubljana
revoli wrote:
I am already checking this in the strategy but it is not stopping multiple positions. They all open in the same bar so I need something that says do this once per bar.

I don't know what you mean with word bar.
However, normaly is a Position variable stored in a Positions variable. If it stored in Positions variable than you can iterate Positions with Loop Viewer or Position Viewer to Close all or just some of it. Check example: https://www.dukascopy.com/vfhelper/lastVersionDescriptionView.action?productId=29


 
 Post subject: Re: Multiple Orders Generated Post rating: 0   New post Posted: Fri 26 Jun, 2015, 12:43 
Visual JForex expert at Dukascopy
User avatar

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

Your strategy is subscribed to 1mn trading period, this basically means that your conditions will be executed every 1 mn candle (bar) which is currently the case.

How would you need your strategy to trade ? what is the maximum number of open positions allowed at a time ?
Can you explain thoroughly so that we can help you ?

Thanks in advance.


 
 Post subject: Re: Multiple Orders Generated Post rating: 0   New post Posted: Tue 30 Jun, 2015, 08:52 
User avatar

User rating: 0
Joined: Fri 23 Aug, 2013, 17:49
Posts: 27
Gorazd_Jernejc wrote:
revoli wrote:
I am already checking this in the strategy but it is not stopping multiple positions. They all open in the same bar so I need something that says do this once per bar.

I don't know what you mean with word bar.
However, normaly is a Position variable stored in a Positions variable. If it stored in Positions variable than you can iterate Positions with Loop Viewer or Position Viewer to Close all or just some of it. Check example: https://www.dukascopy.com/vfhelper/lastVersionDescriptionView.action?productId=29

A bar is same as a candle. So I am getting multiple orders opening on each bar (candle). How do I linit this to once only?


 
 Post subject: Re: Multiple Orders Generated Post rating: 0   New post Posted: Fri 09 Dec, 2016, 13:54 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
VJF new version 1.6.57 is just released which includes a pdf user guide under Help menu.
(Make sure to clear your browser's cookies to access it)
Envoy !


 
 Post subject: Feature request Post rating: 0   New post Posted: Sun 18 Dec, 2016, 09:20 
User avatar

User rating: 1
Joined: Fri 11 May, 2012, 12:05
Posts: 12
Location: Romania, Iasi
Please consider it as a feature request.
The strategies should only be allowed to open only one position by default.
Since I had the same problems I consider it a bug and I am sure it will be fixed in the future versions.
Actually the bug is so serious that I had a margin call on a demo account in a few minutes while the strategy kept opening dozens of positions.
Let's say someone wants to run an automated system with 1mil$ account. Until this bug/bad design won't be fixed they will never consider using visual jforex. There are workarounds, that's ok for me, but not everyone will be willing to accept the risks.
Otherwise I have to say Visual Jforex is an amazing strategy builder. It will become very popular in the next years when it will be stable since it's the best thing around.


 

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