Announcement

Collapse
No announcement yet.

How to format a number

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to format a number

    Hi,
    When we receive a bar high() or low() numbers. it is a number with 7-8 extention after the decimal point. for example
    567.6754321.
    I want to display the number with only 2 digits after the decimal point: 567.67
    Math.round does not give the answer.
    Which operator or object can do the job ?

    Thanks

  • #2
    Alonoak27
    If the question is related to EFS then you can use the .toFixed() method eg myNumber.toFixed(2)
    For future reference EFS related questions should be posted in this forum
    If instead it is related to the Desktop API you may want to repost your question in this forum
    Alex

    Comment

    Working...
    X