Round numbers

 

Hello,

 how I round number to 5 decimals places?

 

Thank 

 
Slavin12:

Hello,

 how I round number to 5 decimals places?

 

Thank 

It depends, what's your goal ?
 
angevoyageur:
Záleží na tom, jaký je váš cíl?
My script return value, but this value can have whatever decimal place. I need some decimal places as have symbol().
 
Slavin12:

Hello,

 how I round number to 5 decimals places?

 

Thank 

See here: https://www.mql5.com/en/docs/convert/normalizedouble

Documentation on MQL5: Conversion Functions / NormalizeDouble
Documentation on MQL5: Conversion Functions / NormalizeDouble
  • www.mql5.com
Conversion Functions / NormalizeDouble - Reference on algorithmic/automated trading language for MetaTrader 5
 
Slavin12:
My script return value, but this value can have whatever decimal place. I need some decimal places as have symbol().

If it's an output issue, you can either use :

   Print("Value = ",DoubleToString(value,5);
or
   printf("My value is %.5f",value);
Reason: