|
Number of positions |
Gereltod
|
Post subject: Number of positions |
Post rating: 0
|
Posted: Mon 04 Aug, 2014, 10:44
|
|
User rating: 0
Joined: Thu 05 Jan, 2012, 14:46 Posts: 1 Location: Mongolia, Ulaanbaatar
|
Hello, Dukas Community I am planning to participate in the strategy contest. But the strategies i compose starts making multiple positions and keeps stacking more orders. How can I limit the number orders at any given time to 1, according to strategy contest rules. Thank
|
|
|
|
|
kostakis
|
Post subject: Re: Number of positions |
Post rating: 0
|
Posted: Thu 18 Sep, 2014, 12:28
|
|
User rating: 1
Joined: Wed 30 Jul, 2014, 14:33 Posts: 95 Location: Lithuania, Vilnius
|
I am facing the same problem. My be anybody from the STAFF could help us with this? Please just give us the code which should be used in case to limit positions to 1 at the same time.
|
|
|
|
|
tcsabina
|
Post subject: Re: Number of positions |
Post rating: 0
|
Posted: Tue 23 Sep, 2014, 07:44
|
|
User rating: 164
Joined: Mon 08 Oct, 2012, 10:35 Posts: 676 Location: NetherlandsNetherlands
|
One way to do this: Use private booleans in the strategy (one for the long and another one for the short orders). Set the boolean to true when you submit the order, and set it to false when the order is closed (order closing can be catch in the onMessage() function). And allow a new order only if the boolean is false.
|
|
|
|
|
men79
|
Post subject: Re: Number of positions |
Post rating: 0
|
Posted: Fri 26 Dec, 2014, 17:12
|
|
User rating: 0
Joined: Wed 20 Jul, 2011, 05:45 Posts: 20 Location: BulgariaBulgaria
|
can you attach a picture?
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|