fxDreema

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

    Crossing Moving Average

    Questions & Answers
    5
    9
    1610
    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.
    • R
      ramimoujaes last edited by

      Greetings,

      I am trying to create/develop an expert advisor where the 50 EMA crosses the 200 EMA, then open position, and close the position when the two EMA's recross. Essentially, positions must be opened and closed at the same time. Unfortunately, it did not quite do that as per below picture:

      0_1598172039448_9b4ce51f-2e4f-44c2-affd-d68d3ac31bef-image.png

      How can I fix this problem, below you can find the shared project:

      https://fxdreema.com/shared/6MpmYdPIb

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

        https://fxdreema.com/howto#Simple-Programs

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

          @ramimoujaes always specify candle ID1 in more settings field

          0_1598203571385_Cattura.JPG

          Even the examples of "how to" are incorrect

          1 Reply Last reply Reply Quote 0
          • R
            ramimoujaes last edited by

            @josecortesllobat @ambrogio Greetings,

            As you can see, the position did not close when the MA re-crosses (even after modifying the ID, it did not close the position), you kindly assistance is much appreciated.

            0_1598279632778_f848c288-5fa4-46dd-8a1b-6a51aa88bc70-image.png

            Below, you can find the link:

            https://fxdreema.com/shared/I0lFYfCMc

            A 1 Reply Last reply Reply Quote 0
            • P
              PipPusher618 last edited by

              @ramimoujaes said in Crossing Moving Average:

              hen open position, a

              Maybe try changing from specified to any symbol under close position.

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

                @ramimoujaes you have modify nothing 😄

                0_1598282032212_Cattura.JPG

                specify candle ID1 on both operand in the condition block

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

                  @ramimoujaes Your project has some blocks fields empty that are important for the project´s logic.

                  My suggestion is always to try to understand the logic of what you are building. The "How To" examples are just a guide to help you to begin from something. Same applies for the suggestions provided on the forum.

                  Said that, what you want is to open - close trades on opposite conditions of a MAs crossover. Here you have an approach

                  0_1598281718830_edd77986-07e9-4ac3-962f-7c66a6cfc198-image.png

                  0_1598282153293_07431abd-7a73-406a-bc97-8bdd622b1290-image.png

                  0_1598282258613_6bee5b65-8140-4a54-8528-3300512cd424-image.png

                  As you can see above,

                  when MA (5) x> MA (200), EA closes Sells (no sells were running, no Buy - Out) and opens Buys (Buy - In)
                  when MA (5) x< MA (200), EA closes Buys (Sell - Out) and opens Sells (Sell - In)

                  As I mentioned earlier, that example is just an approach to what you want but it does not mean that is the only one because fxDreema allows to do the same through different ways.

                  C 1 Reply Last reply Reply Quote 0
                  • C
                    Creven @josecortesllobat last edited by

                    @josecortesllobat Hello am Creven ,
                    Just know I have been looking for such an expert advisor which closes the current position and opens up a new after the recross so I am requesting we chat because I need this badly and I am ready to use it on a real account

                    1 Reply Last reply Reply Quote 0
                    • C
                      Creven last edited by

                      Hello I am Creven.
                      I am requesting someone to share this two moving average expert advisor which closes the current position and opens up a new position after a recross

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

                      Online Users

                      F
                      E
                      A
                      M
                      E
                      T
                      S
                      A
                      M
                      M

                      26
                      Online

                      146.6k
                      Users

                      22.4k
                      Topics

                      122.6k
                      Posts

                      Powered by NodeBB Forums | Contributors