fxDreema

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

    Can I set my Buy & Sell EA to ONLY Buy or ONLY Sell?

    Questions & Answers
    6
    21
    6099
    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.
    • D
      Dre last edited by

      Hi Guys,

      I have created an EA that opens a Buy trade when certain conditions are met and opens a Sell trade when the opposite conditions are met.

      How can I set this EA to only open Buy trades and ignore Sell signals and vice versa when I feel there is a favourable direction?

      I was hoping that there would simply be an option in MT5 (perhaps in the Properties of the EA) but it appears not.

      Or would I have to create a separate Buy and separate Sell EA altogether?

      Thanks,

      Dre

      1 Reply Last reply Reply Quote 0
      • S
        seb 0 last edited by

        Hi, you should share your project so we can help you.

        1 Reply Last reply Reply Quote 0
        • D
          Dre last edited by

          0_1584575808395_Untitled.png

          Thank you

          X 1 Reply Last reply Reply Quote 0
          • X
            Xfire @Dre last edited by

            @dre Hi.
            you should use two "No position" blocks for separating.
            you need few blocks for control ON or OFF "No position" blocks.
            for example, you can use "Constants" for manually controlling or check ATR for On or OFF blocks....

            IN GOD WE TRUST

            1 Reply Last reply Reply Quote 0
            • D
              Dre last edited by

              Thanks for your help.

              I am having difficulty understanding what you mean.

              I am fine with manually setting if I want the EA to "sell only" or "buy only".

              So I need to add some "Turn OFF Blocks" blocks and "Turn ON Blocks" blocks?

              How do I allow them to be controlled as inputs in MetaTrader using Constants?

              I am fine with using simple Constants like inputting a Lot Size in MetaTrader etc. but unsure how I would control the "Turn OFF Blocks" and "Turn ON Blocks" blocks with Constants.

              Thanks

              X T 3 Replies Last reply Reply Quote 0
              • X
                Xfire @Dre last edited by Xfire

                @dre i hope you can take idea...
                3 status are here for input, you can write, Both, Buy or Sell and control blocks for activate

                https://fxdreema.com/shared/wGwOoNHQb

                sorry for my English 🙂

                IN GOD WE TRUST

                1 Reply Last reply Reply Quote 0
                • X
                  Xfire @Dre last edited by

                  @dre I updated the link now

                  IN GOD WE TRUST

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    dragonfly617 last edited by

                    Hello;
                    you can do it this way

                    0_1584619384207_c70811e9-dce9-442d-a6c0-8f730235797f-image.png

                    X D 2 Replies Last reply Reply Quote 0
                    • T
                      trader.philipps @Dre last edited by

                      @dre If you don't want that logic in your EA, you might set the desired setting in EA properties as well.

                      0_1584620239155_3ee9cb9f-44b2-477b-a5bb-4b7a594e7a95-image.png

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

                      X 1 Reply Last reply Reply Quote 0
                      • X
                        Xfire @dragonfly617 last edited by Xfire

                        @dragonfly617 this way is not safe. maybe profit is negative and close positions aren't good idea

                        IN GOD WE TRUST

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

                          @xfire This setting only applies to opening a new position afaik

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

                          X 1 Reply Last reply Reply Quote 0
                          • X
                            Xfire @trader.philipps last edited by

                            @trader-philipps i think not working in mt5

                            IN GOD WE TRUST

                            1 Reply Last reply Reply Quote 0
                            • X
                              Xfire @trader.philipps last edited by

                              @trader-philipps if before new position other positions were open then we cant use block "3" as not safe.
                              if wasn't open any position then block "3" didn't need.

                              IN GOD WE TRUST

                              1 Reply Last reply Reply Quote 0
                              • D
                                Dre @Xfire last edited by

                                @xfire said in Can I set my Buy & Sell EA to ONLY Buy or ONLY Sell?:

                                @dre I updated the link now

                                @Xfire Thank you.

                                I think I understand it but how do I write the Constant? I guess we are trying to make a drop-down box to select either "Buy Only", "Sell Only" or "Both"? What data type of Constant will this be - "enum"? I am not familiar with "enum" but will try to work it out if this is what I need to use.

                                Thanks

                                X 1 Reply Last reply Reply Quote 0
                                • D
                                  Dre @dragonfly617 last edited by

                                  @dragonfly617 Thanks for the advice. I'm probably just being stupid (I'm new to fxDreema) but I don't understand the logic here. But thanks for trying to help.

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    Dre last edited by

                                    @trader-philipps said in Can I set my Buy & Sell EA to ONLY Buy or ONLY Sell?:

                                    @dre If you don't want that logic in your EA, you might set the desired setting in EA properties as well.

                                    0_1584620239155_3ee9cb9f-44b2-477b-a5bb-4b7a594e7a95-image.png

                                    This would be IDEAL! This is all I want. But I don't have this option. Is this in MT4? I am using MT5.

                                    T 1 Reply Last reply Reply Quote 0
                                    • X
                                      Xfire @Dre last edited by

                                      @dre in the left corner you can click and open a window to create your constant.

                                      if you can use Enum you can take a sample from indicators mq5 files and change for yourself in Ea mq5 file.

                                      0_1584653390593_Annotation 2020-03-03 092250.png

                                      IN GOD WE TRUST

                                      1 Reply Last reply Reply Quote 0
                                      • D
                                        Dre last edited by

                                        @Xfire Thank you very much. I will give it a go 🙂

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

                                          @dre Screenshot ist mt4

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

                                          1 Reply Last reply Reply Quote 0
                                          • F
                                            fxbizpro last edited by

                                            i also looking for the same solution here

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

                                            Online Users

                                            M
                                            F
                                            N
                                            L
                                            A

                                            14
                                            Online

                                            146.6k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors