Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

IOrder.getCommission() returning half commission on demo ?
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=65&t=57253
Page 1 of 1

Author:  G4815 [ Wed 22 Jan, 2020, 07:51 ]
Post subject:  IOrder.getCommission() returning half commission on demo ?

Hi, I'm encountering an issue that I cannot understand :
I have a strategy that writes a log of every trade in a CSV when a trade closes (onMessage, message.getType()==Type.ORDER_CLOSE_OK, order.getCommission()).
It returns the proper commission during a backtest : it's matching the HTML test report as well as the commission using the Forex Calculator.
But when I tried it on a demo account the commission is about half of what it should be (proper commission is in the position report web page). I am not using a global account for the demo and there was no deconnection / reconnection between the opening and closing of the trades (according to the message log). It's doing it for every single trade.
I'm guessing it's only accounting commission for the closure but it shouldn't do that and there is a discrepancy with what I get in backtest.
Could it be that I found a bug ?

Author:  vadim_berezhnoj [ Mon 17 Feb, 2020, 18:36 ]
Post subject:  Re: IOrder.getCommission() returning half commission on demo ?

Hello.

There was one similar bug some time before and it was fixed on platform. Please check the platforms version.
If it is up to date please provide the code example that replicates the issue.

Kind regards, Support Team.

  Page 1 of 1