Wiki JStore Search Login

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.

IOrder.getCommission() returning half commission on demo ?
 Post subject: IOrder.getCommission() returning half commission on demo ? Post rating: 0   New post Posted: Wed 22 Jan, 2020, 07:51 

User rating: 0
Joined: Mon 04 Nov, 2019, 03:51
Posts: 3
Location: Canada, Vancouver
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 ?

 Post subject: Re: IOrder.getCommission() returning half commission on demo ? Post rating: 0   New post Posted: Mon 17 Feb, 2020, 18:36 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 546
Location: Ukraine, Kiev

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.


Jump to:  

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