|
APICLIENT-258 Version 2.7 and partial exits |
bunyip
|
Post subject: APICLIENT-258 Version 2.7 and partial exits |
Post rating: 0
|
Posted: Mon 13 Aug, 2012, 16:33
|
|
User rating: 2
Joined: Thu 01 Mar, 2012, 17:17 Posts: 42
|
Hi Support,
I see version 2.7 is out today--congratulations!
Unfortunately, though, my code for partial exits now triggers a complete close, which it didn't before. Moreover, the 'PartialClose' code in the Wiki does the same thing, so the problem seems to be general. I do hope you can sort this problem out quickly.
Many thanks,
Bunyip
|
|
|
|
![](images/spacer.gif) |
bunyip
|
Post subject: Re: Version 2.7 and partial exits |
Post rating: 0
|
Posted: Tue 14 Aug, 2012, 16:13
|
|
User rating: 2
Joined: Thu 01 Mar, 2012, 17:17 Posts: 42
|
Guys, I'm sorry but this post belongs in Bug Reports. The problem I describe means that no-one can now part-close an open trade to take profit, and it affects the code you yourselves have posted in your Wiki ( https://www.dukascopy.com/wiki/#Close_Orders). Best regards, Bunyip
|
|
|
|
![](images/spacer.gif) |
API Support
|
Post subject: Re: Version 2.7 and partial exits |
Post rating: 0
|
Posted: Wed 15 Aug, 2012, 07:55
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
We checked with the following strategy that it is not the case:
Attachments: |
PartialClose.java [2.56 KiB]
Downloaded 392 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.
|
|
|
|
|
![](images/spacer.gif) |
bunyip
|
Post subject: Re: Version 2.7 and partial exits |
Post rating: 0
|
Posted: Wed 15 Aug, 2012, 18:38
|
|
User rating: 2
Joined: Thu 01 Mar, 2012, 17:17 Posts: 42
|
Well I'm glad the problem doesn't affect everybody. But when I run the strategy you've attached on a Demo chart, I get:
2012-08-15 17:12:21 order1 closePrice=1.22807 closeTime=2012-08-15 17:12:21.473 state=CLOSED 2012-08-15 17:12:21 Order has been closed completely. Stop the strategy 2012-08-15 17:12:21 Message Type: ORDER_CLOSE_OK; Text: null; Related Order: [order1]-CLOSED / EUR/USD / 1.22818 / 0.001 / 0.001 2012-08-15 17:12:20 Message Type: NOTIFICATION; Text: ORDER_FILLED-Order FILLED at 1.22807 USD (#158003828 SELL 0.001 mil. EUR/USD @ MKT MAX SLIPPAGE 0.0005) - Position #40797849; Related Order: [order1]-FILLED / EUR/USD / 1.22818 / 0.001 / 0.001 2012-08-15 17:12:19 Message Type: ORDER_FILL_OK; Text: ; Related Order: [order1]-FILLED / EUR/USD / 1.22818 / 0.001 / 0.001 2012-08-15 17:12:19 Message Type: NOTIFICATION; Text: ORDER_FILLED-Order FILLED at 1.22818 USD (#158003824 BUY 0.001 mil. EUR/USD @ MKT MAX SLIPPAGE 0.0005) - Position #40797849; Related Order: [order1]-OPENED / EUR/USD / 0.0 / 0.001 / 0.001 2012-08-15 17:12:15 Message Type: ORDER_SUBMIT_OK; Text: ; Related Order: [order1]-OPENED / EUR/USD / 0.0 / 0.001 / 0.001.
And the results are identical when I run it in the Historical Tester, with the Strategy Report confirming that there are no partial exits.
Have you any ideas what could cause my results to differ from yours? And is there anything I should check or alter?
Many thanks for your help,
Bunyip
|
|
|
|
![](images/spacer.gif) |
API Support
|
Post subject: Re: Version 2.7 and partial exits |
Post rating: 0
|
Posted: Thu 16 Aug, 2012, 08:30
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
The attached strategy uses different order amounts than those that are shown in your log, so it can't be the log for this strategy.
|
|
|
|
![](images/spacer.gif) |
bunyip
|
Post subject: Re: Version 2.7 and partial exits |
Post rating: 0
|
Posted: Thu 16 Aug, 2012, 11:53
|
|
User rating: 2
Joined: Thu 01 Mar, 2012, 17:17 Posts: 42
|
No, I changed the amounts because my demo account is set too small to handle $1 million trades. Having said that, I must apologise because I didn't do it quite right before and I *can* now get the strategy to work in demo.
What I still can't do, though, is get it to work in the Historical Tester. Here's the result with your code untouched:
2012-08-16 10:50:02 order1 closePrice=1.33133, amount=1.000, requestedAmount=1.000, closeTime=2011-11-29 00:00:10.000, state=CLOSED 2012-08-16 10:50:02 order1 closePrice=1.33133, amount=1.000, requestedAmount=1.000, closeTime=2011-11-29 00:00:10.000, state=CLOSED 2012-08-16 10:50:02 Order has been closed completely. Stop the strategy 2012-08-16 10:50:02 ORDER_CLOSE_OK - Order closed order: CLOSED BUY 1.0 @ 1.33151 2012-08-16 10:50:02 ORDER_FILL_OK - Order filled order: FILLED BUY 1.0 @ 1.33151 2012-08-16 10:50:02 ORDER_SUBMIT_OK - Order submitted order: OPENED BUY 1.0 @ 0.0
And again, the Strategy Report confirms that there were no partial exits. do you get this problem? And if not, what should I check next?
Many thanks,
Bunyip
|
|
|
|
![](images/spacer.gif) |
API Support
|
Post subject: Re: Version 2.7 and partial exits |
Post rating: 0
|
Posted: Thu 16 Aug, 2012, 12:03
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
bunyip wrote: What I still can't do, though, is get it to work in the Historical Tester. In fact it occurs only in Historical Tester. Our assistance would have been more efficient, had you mentioned it in your first post.
|
|
|
|
![](images/spacer.gif) |
bunyip
|
Post subject: Re: APICLIENT-258 Version 2.7 and partial exits |
Post rating: 0
|
Posted: Thu 16 Aug, 2012, 15:43
|
|
User rating: 2
Joined: Thu 01 Mar, 2012, 17:17 Posts: 42
|
You're right, of course. I'm really sorry for the confusion.
Many thanks as always for your assistance.
|
|
|
|
![](images/spacer.gif) |
|
Pages: [
1
]
|
|
|
|
|