Dukascopy Support Board http://www.dukascopy.com/swiss/english/forex/jforex/forum/ |
|
commision in pips or any other commision determination http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=83&t=50885 |
Page 1 of 1 |
Author: | tabacco [ Fri 07 Mar, 2014, 21:57 ] |
Post subject: | commision in pips or any other commision determination |
Introduction I am working on a full automatic trading solution. as part of my evaluation before opening a trade it should be possible to know the (exact) commission (in pips) that i have to pay for opening the position. Problem Actually there are 3 "problems"
Getting the commission when the system starts The current commission rate is available in Portfolio->my commission, however i don't want to manually look it up and input it in my trading system. A workaround could be to do a small trade (1000 base units) and calculate the commission, however this is inaccurate (commission is rounded at small trades, for example 1000000 EUR/USD @ 18 costs 24.95 USD one way but 1000 cost me 0.02 USD) Another problem with the workaround is that you need to receive different instrument quotes to do the calculation (if account currency is EUR, and you do a USD/JPY trade, you also need the EUR/USD quotes to calculate). Solution: It would be nice to create a method like (double) IAccount.getCommission that returns the commissions in USD$ per MIL. Get the commission when the system is running When the system is running we want to be sure to get the current commission rate, after we started it could be changed (because we do a lot of trades for example). So it would be nice to update the commission. In my opinion there are different ways to do this
The best way (in my opinion) is to send an iMessage when the commission rate is changed. one way of doing it is to include the new commission rate in the message content. another way is to run the new method (IAccount.getCommission) when the message is recieved. Get the commission in pips without using instruments that we do not trade Another great feature would be to know/retrieve the commission rate in Pips. if we know the rate (with the suggested method) we still need to do some conversions to get the pip value (for example base currency EUR, and want to know pip value for EUR/JPY. then we need to know the EUR/USD quote). It is not hard to calculate it if we have the quotes but i don't want to receive all the quotes all the time for the different instruments that i don't trade. Solution: A better way should be to to send them once every while so that the API has some quotes available when the new method is run: (double) Instrument.getCommissionInPips There is a chance that the quotes for the non-traded instruments are out-dated if they are send once every while, however when calculating the commission a small 'rounding' error has not much impact. |
Author: | API Support [ Mon 10 Mar, 2014, 17:49 ] |
Post subject: | Re: commision in pips or any other commision determination |
Such feature request has already been registered. See: viewtopic.php?t=49826 |
Author: | tabacco [ Mon 10 Mar, 2014, 21:12 ] |
Post subject: | Re: commision in pips or any other commision determination |
Quote: fantom wrote: Also, why classes Commissions and Overnights are depricated? Quote: your answer Because those values change over time and it is not possible to release JForex-API in sync with every new Overnight/Commission rate change. I do not understand this. When i place an order in the strategy tester, the API should know the commission rate because it subtracts it from my equity. When i place an order in live mode, the server should know the commission rate because it subtracts it from my equity. |
Author: | API Support [ Tue 11 Mar, 2014, 08:50 ] |
Post subject: | Re: commision in pips or any other commision determination |
tabacco wrote: When i place an order in the strategy tester, the API should know the commission rate because it subtracts it from my equity. Only certain parts from the Historical Tester are part of the API.tabacco wrote: When i place an order in live mode, the server should know the commission rate because it subtracts it from my equity. Server is not part of our API.
|
Author: | tabacco [ Tue 11 Mar, 2014, 19:29 ] |
Post subject: | Re: commision in pips or any other commision determination |
do you mean that i should place the feature requests in the trading platforms - feature requests board ? |
Author: | API Support [ Wed 12 Mar, 2014, 08:20 ] |
Post subject: | Re: commision in pips or any other commision determination |
No the place is right. |
Page 1 of 1 |