fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    2 decimal places

    Questions & Answers
    2
    3
    2019
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Mantadiver last edited by

      I have noticed when displaying data on screen using "Comment" & "Draw Text" blocks that often numbers display to 12 decimal places. In my opinion 3 is enough to show you have a sense of humour & 2 is what I am after.

      I have tried using NormalizeDouble on numbers I am generating but what about system generated values ?

      For example (attached) this is the Account / Margin Level (in %). It shows 12 decimals. Can the system be made to restrict it to 2 or do I need to place it in a new variable & amend it (seems a bit wasteful).

      This also seems to happen when generating values from Buckets.

      Many thanks.0_1528887335643_Decimals.JPG

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        I'm aware of this problem and I tried to minimize it, but it looks that it just happens, even if you are using all the functions that are supposed to fix it. Take a look at their documentation: https://www.mql5.com/en/docs/convert/normalizedouble

        Please note that when output to Journal using the Print() function, a normalized number may contain a greater number of decimal places than you expect.

        1 Reply Last reply Reply Quote 0
        • M
          Mantadiver last edited by

          OK thanks, it's not material, just aesthetic !

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          Online Users

          E
          J
          T
          J
          B

          17
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors