Wiki JStore Search Login

 Post subject: Rounding Post rating: 2   New post Posted: Tue 14 Jul, 2015, 14:31 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi all !

For those wondering how to round a double variable, I'm attaching an example that rounds an indicator output to 2 digits. If you need more then change the divider (currently 100)
If you need to remove all the decimals, then simply assign your indicator's output to an "integer" variable freshly created.


Rounded2digits.vfs [15.66 KiB]
Downloaded 402 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.

Jump to:  

  © 1998-2011 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