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.

get commissions before opening an order
 Post subject: get commissions before opening an order Post rating: 0   New post Posted: Tue 10 Apr, 2012, 10:29 

User rating: 0
Joined: Mon 23 May, 2011, 13:03
Posts: 6
Location: Switzerland,
Dear Support

For my money management it would be nice to get my commissions before opening an order. I know there is a possibility in another post from you:

https://www.swfx-marketplace.com/swiss/e ... 65&t=44817

but there you need the inputs: "Monthly turnover", "Equity at settlment", "Net deposit"

So if I take your solution from the previous post, it would be great to get automatically these inputs. Are there any functions to get these inputs without typing in by myself?

I hope you understand my problems/wishes otherwise don't hesitate to ask.

Best regards,
bigtrader


 
 Post subject: Re: get commissions before opening an order Post rating: 0   New post Posted: Wed 11 Apr, 2012, 09:58 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
bigtrader wrote:
So if I take your solution from the previous post, it would be great to get automatically these inputs. Are there any functions to get these inputs without typing in by myself?
The commission depends on these values, and not all necessary data is available from API:
  • "Monthly turnover" - you could get by summing the amounts of last month's positions, see: https://www.dukascopy.com/wiki/#Order_history Note that you need to multiply the amount by 2 since both position fill order and position close order count towards turnover.
  • "Equity at settlment" - you could get by IAccount.getBaseEquity.
  • "Net deposit" - you can't get this from API, if you assume that you have only made one deposit and that your total profit/loss is 0, then you could use IAccount.getBalance.


 

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