fxDreema

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

    How can I specify a distance between indicators?

    Questions & Answers
    3
    6
    1968
    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.
    • isp00rt
      isp00rt last edited by

      I want to create an EA in which the main condition is that a Moving Average must be AT LEAST 30 pips above/below another Moving Average. Which block should I use? I see that the "Condition" one can compare the value of indicators but apparently not distances.

      Any help?

      1 Reply Last reply Reply Quote 0
      • J
        josecortesllobat last edited by

        Hi

        This could be work for your purpose

        0_1517954827318_a9979879-b4ab-4b9f-a9b4-9769309acfcf-image.png

        Regards

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

          Great! Thank you very much 😉

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

            I found this within the "Condition" block. Would it work?

            0_1517992658900_01.png

            In this example, the value of the second operand (the right MA) would be modified by susbtracting it 20 pips, if I understand it correctly. Is this how it works?

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

              Yes, this should remove 20 pips from the value of MA20. If the value of MA20 is let's say 1.2345, then this value will be modified to be 1.2325 (which is 1.2345 - 0.0020). You can actually see the result of this calculation if you try this in the "Trace" block

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

                Ok. Thank you.

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

                Online Users

                F
                R
                S
                D
                V
                O

                15
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors