fxDreema

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

    Help with Fractals

    Questions & Answers
    3
    8
    549
    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.
    • F
      Fingon last edited by

      Hello, I would deeply appreciate some assistance here. This is my first time on this website, and so far it looks much better than all the other EA builders I've seen.

      I am trying to create a piece of code that performs an action (drawing a trendline, but that's not relevant for this post) when three fractal high and then fractal low pairs form, each pair having a lower high and a lower low than the last. So something like this :

      wym.png

      I created 6 variables, one for each FH/L , but I don't know how to assign the variables chart based values that make it possible to later compare them so as to ensure that FH2 is lower than FH1 on the chart, and FH3 is lower than FH2 (and the same for the fractal lows).

      Thank you.

      1 Reply Last reply Reply Quote 0
      • X
        xiawu last edited by

        You can use objects (such as Arrow Down) to draw your fractal highs based on your specified conditions (such as the attached image).

        Screeny.png
        Then, to compare between FH2 and FH1:

        • Use the loop operation block - "Loop for Chart Objects" > "For each Object".
        • Include 2 conditions under this block,
        1. The same condition as the image and
        2. Candle(3) high < (is below) Price level 1 of the object taken from the loop

        You may need another separate object (Arrow Up) for your fractal lows and just switch the above conditions to the opposite.

        F 1 Reply Last reply Reply Quote 1
        • jstap
          jstap last edited by

          Interesting but I don't think that is how fractals work double:
          iFractals(
          string symbol, // symbol
          int timeframe, // timeframe
          int MODE_LOWER or MODE_UPPER, // line index
          int shift // shift
          );
          This code will give you the value of an arrow, shift is a number to choose how far back is the arrow. Put this into a comment, work out how to use it, and then you will have to have a set of conditions (or code), to decide whether the arrows are on the way DN or UP.

          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! 😊

          F 1 Reply Last reply Reply Quote 0
          • F
            Fingon @jstap last edited by

            @jstap Thanks for your reply! I'm not sure I understand though - where would that code go on the website, and what do you mean by the arrows?

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

              By arrows, I mean the ones created by the fractal indicator, this would go into custom code.

              iFractals(NULL,0,MODE_UPPER,0) put this in a comment as text code input, you will see the value returned, then check and work out what you want to do next with it.

              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
              • F
                Fingon last edited by

                Thank you! I think I'm too much of a newbie at coding to understand what you are saying, but hopefully when I open the builder and mess around a bit, I'll get it 😅

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

                  Fx most the most part prevents the need for any coding, occasionally though there is no choice. learn the simple first, then you can move on to coding stuff

                  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
                  • F
                    Fingon @xiawu last edited by

                    @xiawu said in Help with Fractals:

                    You can use objects (such as Arrow Down) to draw your fractal highs based on your specified conditions (such as the attached image).

                    Screeny.png
                    Then, to compare between FH2 and FH1:

                    • Use the loop operation block - "Loop for Chart Objects" > "For each Object".
                    • Include 2 conditions under this block,
                    1. The same condition as the image and
                    2. Candle(3) high < (is below) Price level 1 of the object taken from the loop

                    You may need another separate object (Arrow Up) for your fractal lows and just switch the above conditions to the opposite.

                    Thanks, Ill check that out.

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

                    Online Users

                    A
                    A
                    L
                    G
                    N
                    S
                    E
                    S
                    N

                    19
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors