fxDreema

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

    Hi, I Hope somebody can help

    Questions & Answers
    0
    15
    497
    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.
    • C
      Cpt_Cook last edited by

      Im trying to create an EA for MT4. My goal is to buy and sell at the same time, with each trade set for a 10 pip tp. Once either one is hit I want another buy and sell open at that price. same as the next tp and next tp.
      Also need help figuring out how to close all positions once daily equity target has been hit. Would appreciate any help at all

      1 Reply Last reply Reply Quote 0
      • T
        tpt last edited by

        There you go: http://fxdreema.com/shared/r5wg6gZtc

        Convert it to MQL4 so you will have a better understanding of each block.

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

          Thank You very much. I will try it out. That was a super quick response. Appreciate it

          1 Reply Last reply Reply Quote 0
          • T
            tpt last edited by tpt

            You're welcome!

            'ON_OFF_Switch' has to be a variable instead of a constant. My fault!

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

              It wouldnt open any positions. Have I made a mistake shared/zBGIbeHR

              T 1 Reply Last reply Reply Quote 0
              • C
                Cpt_Cook @tpt last edited by

                @tpt https://fxdreema.com/shared/zBGIbeHR

                1 Reply Last reply Reply Quote 0
                • T
                  tpt @Cpt_Cook last edited by tpt

                  @cpt_cook Add 'On_Off_Switch' variable (blue-boxed instead of orange-boxed) wherever it is being used.

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

                    Brilliant thank you. The only thing is that it doesn't open a new buy and sell when one of the positions hits take profit

                    1 Reply Last reply Reply Quote 0
                    • T
                      tpt last edited by

                      Are you sure? It has to.

                      Just download this project and import it into your account: http://fxdreema.com/shared/wkMBR4cme

                      0_1674219366253_Screenshot_2.jpg

                      T C 2 Replies Last reply Reply Quote 0
                      • T
                        tho401 @tpt last edited by

                        @tpt is there any smart way to make it cover the spred?
                        in my strategy tester backtest it looks like its slowly losing becouse of the spred, would be interesting to get it break even

                        T 1 Reply Last reply Reply Quote 0
                        • T
                          tpt @tho401 last edited by tpt

                          @tho401 I'm not sure exactly. Do you mean covering the spread by extending the take-profit price to 10pips + the spread size?

                          T C 2 Replies Last reply Reply Quote 0
                          • T
                            tho401 @tpt last edited by

                            @tpt yes, but that woul bring some risk too.

                            making such a EA break enen (plus minus zero) would make it valuable for Rebate trading, if the brokerage pays back 4$ - 8$ rebate per standart lot. It would Generate spreads/Turnover, from which the brokerage pays you back 60-80%

                            i guess its impossible to cover the spread risk free, it would involve risk no matter how its attempted.

                            1 Reply Last reply Reply Quote 0
                            • C
                              Cpt_Cook @tpt last edited by

                              @tpt Thats amazing. Risky but really good. Thank you very much. I was expecting about 50 blocks to make that.

                              1 Reply Last reply Reply Quote 0
                              • C
                                Cpt_Cook @tpt last edited by

                                @tpt See the idea behind it is having 1 buy and one sell. if for example the buy hits its 10 pips TP its opens another buy and sell. Then imagine in this scenerio the price comes back to where the first trades were bought. The EA closed all positions because we have hit our equity daily target.

                                For example;
                                1rst Buy/Sell
                                Buy 10pip profit/Sell broke even
                                2nd Buy/Sell
                                Buy 10 pip loss and sell 10 pip profit

                                So we still come out at ten pips. Even if the second buy take profit gets hit then the price falls back to the second trade levels we still have a 10 pip profit and all trades close automatically.

                                I know trades trade may keep going up in price but if it mostly bounces back eventually. I've been doing this manually and 9 times out of 10 its profitable but a lot of effort for 10 pips. Can you help adjust or is this eactly what the EA is doing?

                                T 1 Reply Last reply Reply Quote 0
                                • T
                                  tpt @Cpt_Cook last edited by

                                  @cpt_cook Yes, that's exactly what the EA does.

                                  The technique you refer to is called grid trading. Google it and you'll find a bunch of useful information.

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

                                  Online Users

                                  M
                                  M

                                  14
                                  Online

                                  146.7k
                                  Users

                                  22.4k
                                  Topics

                                  122.6k
                                  Posts

                                  Powered by NodeBB Forums | Contributors