fxDreema

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

    EA using fractals

    Questions & Answers
    3
    4
    2633
    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.
    • S
      sli1 0 last edited by

      Trying to get an EA to do the following
      Daily - Price above 20EMA - long (for clarity drew a 480EMA on hourly chart - see picture)
      price below 20EMA -short
      Fractals to form an abc pattern, with bar 2 breaking the 20EMA, bar 3 having a higher high than bar 2 high, bar 3 low to be higher than bar 2 high.

      drawing lines for testing, but can't see my mistake. Would appreciate a fresh set of eyes.

      Kind Regards

      https://fxdreema.com/shared/dAAFW5sgc

      0_1570104751400_fractals2.PNG

      getting this

      0_1570104849991_fractals1.PNG

      1 Reply Last reply Reply Quote 0
      • A
        ambrogio last edited by

        Listen, I only opened the first block of your project and saw that you use candle ID 0, review your project using candle ID1, candle ID0 is an error, and keep in mind that fractal is a little repaint indicator (often appears on candle ID 02)

        1 Reply Last reply Reply Quote 0
        • S
          sli1 0 last edited by

          I just had a look at the examples and for a price v indicator, and it used candle ID 0. This is to simply to give direction on a higher time frame.

          I got some assistance on the fractals from other posts

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

            Using ID0 on the daily filter shouldn't be a problem in this case.

            This is a slight problem:
            0_1570113639252_8e422ad8-f0f5-4c5b-8622-525de3ba94ef-image.png

            You see, when candle ID 2 has no fractal, then its value is 0, which is below candle high. This will mess up your last_fractal variable and so on.

            Since we know that fractals (up and down) have value 0 when there are no fractals, we don't have to compare price at all to find the fractals - simply use "fractal down != 0" and "fractal up != 0" as your blocks #51 and #52

            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

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

            Online Users

            J
            A
            Z
            T
            B

            17
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors