fxDreema

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

    One trade per condition

    Questions & Answers
    4
    7
    519
    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.
    • T
      thugwig last edited by thugwig

      Hi, i would like for the EA to open one trade only once when the condition is met.

      This is the code i have so far
      https://fxdreema.com/shared/a414Eb3Jd

      When MA 1 crosses above MA 2 a buy trade is open and TP or SL is hit.

      The buy trade scalps really quick and closes. In turn the condition may still be true, causing the EA to re open a new trade.

      How do i get it to open one trade per cycle and onced close (from TP or SL), only open a new trade when a new crossing of MA 1 and MA 2 happens? (whether its 5 mins or 1 hour after)

      M 1 Reply Last reply Reply Quote 0
      • B
        Banjo last edited by

        Good question, I have tried to solve this issue several times, people pls, help here.

        1 Reply Last reply Reply Quote 0
        • M
          massoudsl @thugwig last edited by

          @thugwig first you have to use no trade block then once per bar...even you can use variables block to reset your strategy

          T 1 Reply Last reply Reply Quote 0
          • T
            thugwig @massoudsl last edited by

            @massoudsl thank you, would you be able to show me an example of how to reset using variable blocks? and is no trade and no position the same thing?

            M 1 Reply Last reply Reply Quote 0
            • M
              massoudsl @thugwig last edited by

              @thugwig https://fxdreema.com/shared/4K2xz0xnb

              T 1 Reply Last reply Reply Quote 0
              • T
                thugwig @massoudsl last edited by

                @massoudsl thank you, your a legend, this appears to have work. will do some more testing on it

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

                  I believe both codes are good and would do

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

                  Online Users

                  E
                  S
                  K
                  S
                  G
                  B

                  21
                  Online

                  146.6k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors