Dukascopy
 
 
Wiki JStore Search Login

rounding tp price to 0.1 pips
 Post subject: rounding tp price to 0.1 pips Post rating: 0   New post Posted: Mon 04 Nov, 2013, 20:30 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
Hi
I get the following message in my live account:

10:40:00 Order REJECTED: CONDITIONAL SELL EUR/USD, REASON: Invalid price format - please use increments of 0.1 pip.


How should I make the calculation, that tp rounds up to 0.1 pips.

thanks for your help
;)


 
 Post subject: Re: rounding tp price to 0.1 pips Post rating: 0   New post Posted: Mon 04 Nov, 2013, 23:23 
User avatar

User rating: 96
Joined: Mon 09 Sep, 2013, 07:09
Posts: 287
Location: Ukraine, SHostka
See here:https://www.dukascopy.com/wiki/#Rounding_prices


 
 Post subject: Re: rounding tp price to 0.1 pips Post rating: 0   New post Posted: Mon 04 Nov, 2013, 23:37 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
Thanks
But i have made my strategy in Visuel Jforex. So i need a solution in visuel. Sorry but i don't have java knowledge....
;)


 
 Post subject: Re: rounding tp price to 0.1 pips Post rating: 0   New post Posted: Mon 04 Nov, 2013, 23:58 
User avatar

User rating: 96
Joined: Mon 09 Sep, 2013, 07:09
Posts: 287
Location: Ukraine, SHostka
roundedPrice = BigDecimal.valueOf(price).setScale(instrument.getPipScale() + 1, RoundingMode.HALF_UP).doubleValue();


 

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