Dukascopy
 
 
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.

Is getProfitLossInUSD method include swap fee ?
 Post subject: Is getProfitLossInUSD method include swap fee ? Post rating: 0   New post Posted: Wed 24 Jun, 2015, 06:46 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
Is getProfitLossInUSD method include swap fee ?

Is there any method can i get swap fee or swap pips for each instruments before or after open position ?


 
 Post subject: Re: Is getProfitLossInUSD method include swap fee ? Post rating: 0   New post Posted: Sat 27 Jun, 2015, 07:58 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
Can Someone Please Reply To My Question ?


 
 Post subject: Re: Is getProfitLossInUSD method include swap fee ? Post rating: 0   New post Posted: Sun 19 Jul, 2015, 10:55 
User avatar

User rating: 4
Joined: Sat 12 May, 2012, 00:28
Posts: 21
Location: New Zealand, Auckland
Probably too late, but anyway.
No, getProfitLossInUSD() method does not include swaps (or maybe it calculates those fees incorrectly).
Moreover, I'm not aware of any method to get swaps (shame on you JForex API developers).
I usually (over)estimate swaps by multiplying order commission by 1.5, so in my code there is something like this:

profitSum = o.getProfitLossInAccountCurrency() - o.getCommission() * 1.5;

where o is IOrder object.


 
 Post subject: Re: Is getProfitLossInUSD method include swap fee ? Post rating: 0   New post Posted: Mon 20 Jul, 2015, 02:46 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
mcs wrote:
Probably too late, but anyway.
No, getProfitLossInUSD() method does not include swaps (or maybe it calculates those fees incorrectly).
Moreover, I'm not aware of any method to get swaps (shame on you JForex API developers).
I usually (over)estimate swaps by multiplying order commission by 1.5, so in my code there is something like this:

profitSum = o.getProfitLossInAccountCurrency() - o.getCommission() * 1.5;

where o is IOrder object.

Thanks You


 

Jump to:  

cron
  © 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