fxDreema

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

    ABS

    Questions & Answers
    4
    5
    353
    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.
    • Pan4Pips
      Pan4Pips last edited by

      Re: Having Absolut Math inserted into Adjust field

      I have a number of variables tracking + and - deflections of parity. Can I use = MathAbs($) in the adjust as I assign variables to other variables ?

      Example Max Bullish 1 (with = MathAbs($) in adjust) = Max Bullish 2 in the absolute state? Or does it need to be somewhere in it's own block?

      I'm trying to replace it's own block with an inversion via x (-1) block.

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

        This is one for programmers. Maybe jstap or roar can provide some help.

        (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
        • jstap
          jstap last edited by

          You can use this in text (code input), MathAbs(variable name), there are other ways, test and if not working add a shared link to look at.

          Learn fxDreema Without the Wait!

          My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

          The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

          Don’t miss out

          Click here➡️ https://mybook.to/fxDreema to get your copy today!

          Enjoy! 😊

          1 Reply Last reply Reply Quote 0
          • Monaco
            Monaco Banned @Pan4Pips last edited by

            @Pan4Pips said in ABS:

            I have a number of variables tracking + and - deflections of parity. Can I use = MathAbs($) in the adjust as I assign variables to other variables ?
            Example Max Bullish 1 (with = MathAbs($) in adjust) = Max Bullish 2 in the absolute state? Or does it need to be somewhere in it's own block?
            I'm trying to replace it's own block with an inversion via x (-1) block.

            Hello,

            Great question! Yes, you can use Math.Abs($) (assuming $ represents your variable) directly in the adjustment as you assign variables to others. This will effectively give you the absolute value of the variable, which you can then assign to another variable, ensuring that you are working with positive numbers regardless of the original variable's sign.

            For your example, using Math.Abs() to define "Max Bullish 1" and then assigning it to "Max Bullish 2" will indeed result in both variables representing the absolute state of your initial value. This method is both efficient and keeps your code clean.

            Regarding your query on replacing its own block with an inversion via a multiplication by -1 block, this is also a viable approach. If you're looking to invert the sign of a value, multiplying by -1 is straightforward. However, if your goal is to ensure the value is always positive, Math.Abs() is the more appropriate choice as it directly converts any number to its absolute value, negating the need for conditional checks or additional blocks to handle negative values.

            In summary, for absolute values, directly using Math.Abs() in your assignments is perfectly fine and encouraged for clarity and efficiency. If you're inverting the sign, multiplying by -1 is correct, but for ensuring positivity, stick with Math.Abs().

            I hope this clarifies your queries. If you have further questions or need examples, feel free to ask!

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

              Thank you! I decided to use another method that will make the bigger picture more efficient.

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

              Online Users

              X
              J
              A
              N
              S
              E
              A
              M
              T
              M

              29
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors