fxDreema

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

    How to stop a buy or sell order when the condition is met with one per tick?

    Questions & Answers
    3
    23
    2242
    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.
    • khalids222
      khalids222 last edited by

      I've put a time filter to minimize one per tick .
      But as you can see in the picture, there are sometimes several consecutive long positions and several short positions.
      I want every each buy each followed by sell .
      I have used NO TRADE ., but I found that sometimes it doesn't apply the terms well, as it doesn't work on some repetitive points.
      Is there any solution؟0_1575384070487_ONE SELL.jpg

      https://fxdreema.com/shared/LLpnNjBtd

      T 1 Reply Last reply Reply Quote 0
      • T
        trader.philipps @khalids222 last edited by

        @khalids222 Is it necessary to work only on current candle? I think the x> x< function will not work propperly on candle ID0.

        Is it a must that a sell follows a buy and vice versa?

        I like to share my knowledge, but expect the others to contribute as well.

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

          @trader-philipps said in How to stop a buy or sell order when the condition is met with one per tick?:

          Is it necessary to work only on current candle? I think the x> x< function will not work propperly on candle ID0.
          Is it a must that a sell follows a buy and vice versa?

          What I specifically want in the event of a sale condition opens only one sale, and in the case of a BUY condition is opened only one BUY.
          I don't want to repeat the same BUY or repeat the same sale successively
          The candle does not matter but prefer to be current

          T 1 Reply Last reply Reply Quote 0
          • T
            trader.philipps @khalids222 last edited by

            @khalids222 Okay. Can there be sell and buy at the same time?

            I like to share my knowledge, but expect the others to contribute as well.

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

              @trader-philipps said in How to stop a buy or sell order when the condition is met with one per tick?:

              Okay. Can there be sell and buy at the same time?

              Preferably one direction,SELL OR BUY

              T 1 Reply Last reply Reply Quote 0
              • T
                trader.philipps @khalids222 last edited by trader.philipps

                @khalids222 Okay, here you go. But I'd really advice to go for candle ID1 on conditions and replace the pass block by a once per bar block. But up to you and your strategy.

                0_1575385776033_7f37768f-89ca-4222-8d38-dc0fafdb57ee-image.png

                0_1575385800380_khalid.mq4

                I like to share my knowledge, but expect the others to contribute as well.

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

                  I appreciate your efforts, I am very grateful to you for helping me

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

                    With extreme regret did not work well, and when working the condition was exceeded.
                    Where there was a purchase and did not open, and there was a sale and did not open either.
                    I see that handling NO TRADE is not good .
                    I have tried ONE PER BAR BUT NOT GOOD .
                    Best choice ONE PER TICK . but I need only one TICK and not tens or hundreds.
                    Is there help give better results, and I thank you in advance

                    T roar 2 Replies Last reply Reply Quote 0
                    • T
                      trader.philipps @khalids222 last edited by

                      @khalids222 The pass block is run once per tick in my example. so that block wouldn't make a difference!?!

                      I like to share my knowledge, but expect the others to contribute as well.

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

                        @khalids222 I have used the "No trade" block for 5 years now and 100% of the time it has worked just as expected.
                        Why do you think it causes a problem?

                        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

                        khalids222 1 Reply Last reply Reply Quote 1
                        • khalids222
                          khalids222 @roar last edited by

                          @roar
                          When I place no trade, the condition is met and is not bought or sold .

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

                            @khalids222 I think the error is somewhere else. Can you make a very simplified example?

                            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
                            • khalids222
                              khalids222 last edited by

                              @roar said in How to stop a buy or sell order when the condition is met with one per tick?:

                              I think the error is somewhere else. Can you make a very simplified example?

                              0_1575395704723_buy1.jpg

                              There is a cross pass: it is not bought and sold

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

                                @khalids222 said in How to stop a buy or sell order when the condition is met with one per tick?:

                                @roar said in How to stop a buy or sell order when the condition is met with one per tick?:

                                I think the error is somewhere else. Can you make a very simplified example?

                                0_1575395704723_buy1.jpg

                                There is a cross pass: it is not bought and sold

                                But you have buy and sell trades open. You don't want multiple open buys or sells, right? Or do you want it?

                                Should the EA close the first buy and now open new buy? Just pay commission?

                                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
                                • khalids222
                                  khalids222 last edited by

                                  @roar said in How to stop a buy or sell order when the condition is met with one per tick?:

                                  But you have buy and sell trades open. You don't want multiple open buys or sells, right? Or do you want it?

                                  i want multiple buys and sells, and i want each every a cross sell or buy

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

                                    Let me explain the subject in more detail and in the pictures so that I understand what I want and how it works

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

                                      Wait a second, I give a solution!

                                      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
                                      • roar
                                        roar @khalids222 last edited by roar

                                        @khalids222
                                        Here:
                                        https://fxdreema.com/shared/lB9xQQUVd
                                        This example checks the cross condition, and opens buy if there are no buys.
                                        If there ARE buy trades, it still opens new, IF last opened trade was a sell.
                                        0_1575396490675_a85b4860-3974-4d9f-80a9-33836d2471dd-image.png

                                        0_1575396553613_ccec2ea6-f3ba-4133-80fe-7aef0c8a6fa1-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

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

                                          Does it work for your purpose?

                                          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
                                          • khalids222
                                            khalids222 last edited by

                                            Thank you very much, I'll try it.
                                            I appreciate your efforts and your response, and thank you

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

                                            Online Users

                                            E
                                            H

                                            12
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors