|
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.
get merged order count |
tcsabina
|
Post subject: get merged order count |
Post rating: 0
|
Posted: Tue 06 Nov, 2012, 11:26
|
|
User rating: 164
Joined: Mon 08 Oct, 2012, 10:35 Posts: 676 Location: NetherlandsNetherlands
|
Hello,
Is it possible to get the amount of orders merged into a merged order in a strategy? If I am not mistaken, in the platform we can see which orders were merged into a merged order. Is this available with the API as well?
I don`t really need to know which particular orders are merged, just want to know how many are merged. I am not merging all orders at once. I merge 2 at a time, like this: merge (order1, order2) = mergeOrder1 merge (mergeOrder1, order3) = mergeOrder2 merge (mergeOrder2, order7) = mergeOrder3 ...
I want to limit the amount of orders to be merged. I could implement a counter for every mergeOrder, but wondering if there is some `help` out there from the API.
thanks and regards.
|
|
|
|
 |
API Support
|
Post subject: Re: get merged order count |
Post rating: 0
|
Posted: Wed 07 Nov, 2012, 14:34
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
tcsabina
|
Post subject: Re: get merged order count |
Post rating: 0
|
Posted: Wed 07 Nov, 2012, 22:49
|
|
User rating: 164
Joined: Mon 08 Oct, 2012, 10:35 Posts: 676 Location: NetherlandsNetherlands
|
Thank you for the reply.
However I didn`t get any further with the linked pages... Here is what I want to achieve: I want to limit the amount of orders that are merged together. My strategy merging automatically, 2 orders at a time. The next time a previously merged order can be merged with a new order. Meaning that after the 2nd merge, a total of 3 orders are merged into one. This goes on and on, but I want to stop this auto merging, let`s say, after 5 orders are merged together. This means 4 iterations: 1st: order1 and order2 are merged, creating mergedOrder1. total merged order count for mergedOrder1: 2 2nd: order3 and mergedOrder1 are merged, creating mergedOrder2. total merged order count for mergedOrder2: 3 3rd: order4 and mergedOrder2 are merged, creating mergedOrder3. total merged order count for mergedOrder3: 4 4th: order5 and mergedOrder3 are merged, creating mergedOrder4. total merged order count for mergedOrder4: 5
When the 5th occur, I would like to see/test what is the merged order count for mergedOrder4. if it is > 4, won`t do the merge.
Is the API offering something I can use here? Based on the linked PDF, messages are created after the orders are merged. I don`t know what does these messages contain (maybe the a list of orders that were merged?), but it is too late as the merge should not occur if the order count is high enough.
If there is no help from the API to reach this, I could think of creating a subclass of the strategy, where I store the order and a merge count for every order. I have created a different topic for this, as I have some issues with it as well:
|
|
|
|
 |
API Support
|
 |
Post subject: Re: get merged order count |
Post rating: 0
|
Posted: Thu 08 Nov, 2012, 10:38
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
tcsabina
|
Post subject: Re: get merged order count |
Post rating: 0
|
Posted: Thu 08 Nov, 2012, 12:58
|
|
User rating: 164
Joined: Mon 08 Oct, 2012, 10:35 Posts: 676 Location: NetherlandsNetherlands
|
Wow!
This is what we can call SUPPORT!
Thank you so much!
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|