fxDreema

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

    How to get normal value?

    Questions & Answers
    2
    2
    739
    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.
    • G
      GSMtricks last edited by

      When i store some indicator value into variable ( for example Accelerator Oscilator )., and then print it i see number like:
      -7E.08-05 But when i hover on Terminal - i see value like: 0.0005678
      So how to get the normal value like: 0.0005678 ??? Coz i need to operate with that numbers...

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

        MetaTrader decides how to format the number automatically in this case. There is a function DoubleToString() to format the number, but the second parameter of this function is the number of digits after the decimal point. If I put 8 digits it prints the value normally, but if the value is for example 10, it prints 10.00000000. So I don't know how to make it work properly for big and small numbers. One way is to add new parameters in the "Comment" block for formatting, but I don't think that I like the idea... I don't know.

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

        Online Users

        N
        S
        T

        12
        Online

        146.7k
        Users

        22.4k
        Topics

        122.6k
        Posts

        Powered by NodeBB Forums | Contributors