fxDreema

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

    Moving Average Crossovers Aren't Working?

    Questions & Answers
    2
    6
    607
    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.
    • Y
      yoloyacht last edited by

      I tried a couple different things.
      When MA(closed) is crosses below MA(open), sell order.

      Also this,
      https://fxdreema.com/shared/eSIEFwG2

      However, it doesn't execute the buy/sell whenever the crossover happens.
      Is there a bug?

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

        @yoloyacht Its just the logic: both sides of the condition are exactly identical here. When they are identical, they cannot be "above" or "below" each other.

        I guess you want to compare to current time, so set the other candle ID to 0 (or 1) and leave the other as 2 (in this example):
        0_1589328964310_3c405ffe-df8c-4e28-bb66-4d0644c4f2f7-image.png

        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

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

          @roar aren’t they different? One MA is based off close price and the other on open. Here’s what I’m trying to do btw
          0_1589338465516_3959CA13-BC40-4B37-AF07-1CB455810E7D.jpeg

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

            @yoloyacht oh, didnt notice that... Well I tested the EA and it did open trades

            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

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

              @roar for that EA it’s opening trades but not where it’s supposed to. I want it to trade at the position like the pic, but it’s off a lot and misses some

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

                @yoloyacht That is the problem with all candle ID 0 values. Candle 0 is the current candle that is still moving. Because its moving, the moving average can also cross multiple times during the candle, and it can also create "fake" crossings where the MA returns back from the cross..

                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

                S
                A
                R
                B
                N
                M
                A
                T
                V
                M
                A
                A
                R
                S

                24
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors