Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

unexpected P/L after merge in historical tester
 Post subject: unexpected P/L after merge in historical tester Post rating: 0   New post Posted: Thu 26 Feb, 2015, 12:52 
User avatar

User rating: 2
Joined: Wed 03 Sep, 2014, 09:11
Posts: 32
Location: GermanyGermany
Hi Support,

there is probably a bug in historical tester:

please have a look at the P/L !!!
    11:39:46 Order [mergeOrder] sucessfully closed : CLOSED BUY amount= 0.005000 open price= 183.7450 close price= 183.6470 P/L pips= -9.8 P/L in account currency= -4.12
    11:39:46 Order [order2] sucessfully closed : CLOSED SELL amount= 0.003000 open price= 183.6470 close price= 183.6470 P/L pips= 0.0 P/L in account currency= 0.00
    11:39:46 Order [order1] sucessfully closed : CLOSED BUY amount= 0.008000 open price= 183.7450 close price= 183.7450 P/L pips= 0.0 P/L in account currency= 0.00
    11:39:46 After merge...1424822415469[2015-02-25 00:00:15.469+0000] / 183.671 / 183.647
    11:39:46 Order [mergeOrder] sucessfully filled : FILLED BUY amount= 0.005000 open price= 183.7450 close price= 0.0000 P/L pips= -9.8 P/L in account currency= -4.12
    11:39:46 merge...1424822415469[2015-02-25 00:00:15.469+0000] / 183.671 / 183.647
    11:39:46 Order [order2] sucessfully filled : FILLED SELL amount= 0.003000 open price= 183.6470 close price= 0.0000 P/L pips= -2.4 P/L in account currency= -0.61
    11:39:46 Order [order1] sucessfully filled : FILLED BUY amount= 0.008000 open price= 183.7450 close price= 0.0000 P/L pips= -9.8 P/L in account currency= -6.60
    11:39:46 Before merge...1424822415469[2015-02-25 00:00:15.469+0000] / 183.671 / 183.647


that would be nice , but is ( unfortunately) impossible...


Attachments:
BugReportProfitLossOfMergedOrders.java [4.36 KiB]
Downloaded 149 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: unexpected P/L after merge in historical tester Post rating: 0   New post Posted: Wed 04 Mar, 2015, 08:47 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
When several orders are merged into one order they don't affect the total equity.
Merge result order has P/L that represents total P/L of all orders closed in merge.


 
 Post subject: Re: unexpected P/L after merge in historical tester Post rating: 0   New post Posted: Wed 04 Mar, 2015, 18:32 
User avatar

User rating: 2
Joined: Wed 03 Sep, 2014, 09:11
Posts: 32
Location: GermanyGermany
thx for your answer and you are right but how can i fetch the real P/L after merge??? The P/L of the closed part is 0.0d and thats definitively not right!

in my example:
total P/L before merge: -6.60 + -0.61 = -7.21
total P/L after merge : -4.12 !!!


 
 Post subject: Re: unexpected P/L after merge in historical tester Post rating: 0   New post Posted: Thu 05 Mar, 2015, 12:17 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
This is correct because the two orders have different amounts.


 
 Post subject: Re: unexpected P/L after merge in historical tester Post rating: 0   New post Posted: Fri 06 Mar, 2015, 14:33 
User avatar

User rating: 2
Joined: Wed 03 Sep, 2014, 09:11
Posts: 32
Location: GermanyGermany
??? :(
Have you read my post?

The correct answer: It is currently impossible to fetch the P/L of the closed part, because it is not implemented.


 

Jump to:  

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