fxDreema

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

    Round Variables Simply

    Questions & Answers
    4
    6
    1003
    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.
    • raveon
      raveon last edited by

      Hello, I am using the following Custom MQL code to remove the many decimal places that a variable sometimes display in a comment.

      RoundTrade4=MathRound(Trade4);

      However, this produces an integer when I want two decimal places. Is there a simple change to this code to make it display 2 decimal places? (that would be nice)

      I have tried other code without success. Thanks

      roar 1 Reply Last reply Reply Quote 0
      • roar
        roar @raveon last edited by

        @raveon Use the same function, but before it multiply by 100, and afterwards divide by 100

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

        L 1 Reply Last reply Reply Quote 0
        • L
          Leka 0 @roar last edited by

          @roar Could you explain to me how to do that please, I have been looking for how to leave only two digits after the period for months.

          roar 1 Reply Last reply Reply Quote 0
          • roar
            roar @Leka 0 last edited by

            @leka-0 you mean for some text bit, like comment message?

            In that case, use

            DoubleToStr(yournumber, 2)

            https://docs.mql4.com/convert/doubletostr

            Need small help? Tag me in your post
            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

            L 1 Reply Last reply Reply Quote 0
            • L
              Leka 0 @roar last edited by

              @roar perfect now it works.
              I have one more doubt, it can be done with fxdreema to link two objects, for example a horizontal line and a text, if the line moves that the text also moves with it, I want the line to show me a description without the need to put the mouse over it, I mean that the description of the line is visible in the graph.

              l'andorrà 1 Reply Last reply Reply Quote 0
              • l'andorrà
                l'andorrà @Leka 0 last edited by

                @leka-0 Not sure that is possible AFAIK. I guess you would need custom code to do that.

                (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

                (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

                (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

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

                Online Users

                F
                R
                S
                D
                V
                O

                18
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors