fxDreema

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

    make EA close all pending orders after Tp triggered

    Questions & Answers
    4
    13
    4909
    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
      Yeh13 last edited by

      hi , i made a simple martingale ea and i can't figure out a way to make the ea close all pending orders after one successful order hits it's Take Profit , i am new to the site, glad for your help.0_1549916107972_Capture.PNG

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

        http://prntscr.com/mjycsz

        1 Reply Last reply Reply Quote 0
        • Y
          Yeh13 last edited by

          Thank you , but it seems not to be working , i tried to connect it in two different ways and both didn't work, i don't know what's wrong !
          0_1549971586964_Capture.PNG

          0_1549971594157_Capture 2.PNG

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

            it has to be on-Trade event not on-Tick event. Show me a full screen

            1 Reply Last reply Reply Quote 0
            • Y
              Yeh13 last edited by

              0_1550066120186_Capture.PNG

              when i tried it ( on trade ) it doesn't place any orders, just shows the ea is working , and i checked my trades nothing wrong with them

              1 Reply Last reply Reply Quote 0
              • Y
                Yeh13 last edited by

                and i tried leaving the block " Trade Closed " not connected to the others, same result.

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

                  Part of it needs to be on-Tick as below. No need to link buy/POs to Trade closed

                  0_1550143594321_Screenshot_2.png

                  1 Reply Last reply Reply Quote 0
                  • Y
                    Yeh13 last edited by

                    OK now it worked ! didn't know i could leave blocks on tick and other on trade , thought they must be all together. Thanks a lot !

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

                      The Trade event fires when there is some trade... event. Like a new trade created, deleted or modified. So the blocks under "on Trade" can run on any of these occasions. But you normally want to detect what exactly happened and that's why those purple blocks (like Trade closed) are used, so you can filter the particular trade event that you want. And of course, these blocks should be located at the top.

                      M 1 Reply Last reply Reply Quote 1
                      • M
                        martin 1 last edited by

                        Hello FxDreema,

                        I tried the same with MT5..... but it doesnt work. Whats the problem?

                        shared/vAOmMoW7d

                        Best regards,
                        Martin

                        1 Reply Last reply Reply Quote 0
                        • M
                          martin 1 last edited by martin 1

                          0_1550601930925_59fe359f-f801-483d-a881-91286c2a14a4-image.png

                          1 Reply Last reply Reply Quote 0
                          • M
                            martin 1 @fxDreema last edited by

                            Hello @fxdreema,

                            I have tested the "delete pending orders" with MT4..... it works and the same in MT5.... it doesnt delete the pending orders.

                            What can be wrong?

                            Best regards,
                            Martin

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

                              I think I fixed it

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

                              Online Users

                              B
                              A
                              J
                              D
                              E

                              19
                              Online

                              146.7k
                              Users

                              22.4k
                              Topics

                              122.6k
                              Posts

                              Powered by NodeBB Forums | Contributors