Backtest does not calculate and show profit/loss correctly

Moderator: admin

Backtest does not calculate and show profit/loss correctly

Postby fritsmaas » Tue Jan 19, 2016 11:03 am

BackTest log.docx
(216.14 KiB) Downloaded 709 times
I created a strategy which opens a position in a multiple of 4 lots and closes the position by an opposite SELL/BUY for each part for each 25 pips of profit reached. So e.g. I open a short with 12 lots on GER30 and open a long for 3 lots on 25, 50, 75 and 100 pips profit. This works fine. With logging I see the open short has 12, 9, 6, 3 lots (field: trade.Lot where trade is a row from the trades table) However the backtest application does not show the right profit on each closed position. It calculated profit is 0 on each position while it should be 25 pips (7.50 euro), 50 pips (15 euro), 75 pips (22.50 euro and 100 pips (30 euros) on the remaining part. The statistics screen shows the right numer of short trades (4). The final balance panel shows not the correct balance, but curiously, it shows the profit pattern as expected (stair step with steps of 25, 50, 75 and 100 as also indicated on the chart). See attached document for screen shots. Please correct this issue.

PS I have disabled hedging in order to close partly an open position with an opposite BUY/SELL order.
fritsmaas
 
Posts: 1
Joined: Tue Sep 16, 2014 5:02 pm

Re: Backtest does not calculate and show profit/loss correct

Postby Julia CJ » Wed Jan 20, 2016 5:36 am

Hi Fritsmaas,

This is a bug. It should be fixed in the upcoming release.
Thank you for the report.
Julia CJ
 


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 13 guests