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.

How to order all freemargin?
 Post subject: How to order all freemargin? Post rating: 0   New post Posted: Thu 15 Jan, 2015, 04:09 

User rating: 0
Joined: Thu 15 Jan, 2015, 03:00
Posts: 8
Location: Vietnam, Da Nang
Hi guys,
When I submit order, if amount > freemargin, my order will be reject. But I want get all freemargin and order.
how to submit order with all freemagrin?


 
 Post subject: Re: How to order all freemargin? Post rating: 0   New post Posted: Tue 20 Jan, 2015, 16:18 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hello dokusan!

You can get free margin by dividing IAccount.getCredtLine() by IAccount.getLeverage().

But you should know, that your order won't be rejected if order's amount is bigger than free margin. It's more complicated: for example you want to buy 1,000,000 EUR for USD (aka open long position with EUR/USD instrument), if current ASK price is 1.15899, then you need 1,158,990 USD to buy 1,000,000 EUR. As there is default leverage equals to 100, then you need 1,158,990 / 100 = 11,589.9 USD margin available to open this position. So that means if you want to open long EUR/USD position with amount 1,000,000 when ASK price is 1.15899 you need 11,589.9 USD of free margin available, if you don't - your order still will be submitted, but during execution it will be partially filled with maximum amount possible for free margin available.

See "Margin Requirements" section here: https://www.dukascopy.com/wiki/#Market_Order


 
 Post subject: Re: How to order all freemargin? Post rating: 0   New post Posted: Fri 23 Jan, 2015, 02:30 

User rating: 0
Joined: Thu 15 Jan, 2015, 03:00
Posts: 8
Location: Vietnam, Da Nang
Thanks for reply. I will try.


 

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