fxDreema

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

    A buy and sell now at the same time

    Questions & Answers
    3
    8
    1062
    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.
    • B
      bertkuiper last edited by

      Hello all,

      I have kind of a stupid question, how can you make a EA for mt5 that triggers a buy and sell at the same time when conditions are met? I spend the whole evening trying all kind of blocks but none seems to work.

      Has anyone ideas?

      My idea is to look how a strategy would perform if you had a long and a short on when certain condition are met and let 1 of them run with a PT or trailing stop.

      Thanks in advance

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

        @bertkuiper just connect "buy now" and "sell now" together, doesnt matter which one is first.

        From a theoritical perspective, though - your net position is still 0 so its kinda useless trade, youre only giving commissions to your broker.

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

          Thanks for your reply

          I tried that already, I put a simple condition like 2 EMA's crossover as a condition and then a buy and sell to that condition. Also when that didn't work I put the sell under the buy which was connected to the condition and that also didn't work. I also tried copying the condition to make a new set with same condition but sell instead of buy block under it but no succes either

          1 Reply Last reply Reply Quote 0
          • B
            bertkuiper last edited by

            @roar also in theory if you put a larger PT than SL for both the buy and sell order you could make profit. That's what I want to test

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

              @bertkuiper what do you mean it didnt work? No trades at all?

              Do you have netting or hedging account? That should be written in the top title of your mt5 window

              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

              B 2 Replies Last reply Reply Quote 0
              • B
                bertkuiper @roar last edited by bertkuiper

                @roar i tried backtesting it on demo and only 1 of both gets active

                A hedge account so that should not be the issue

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

                  @roar I finally figured out the problem, I had my demo balance on 1000$ that for some reason thats to low to put on 2 orders. Indeed when I change the balance higher the condition block with the buy and sell order attached worked.

                  Thanks a lot for your help 😃

                  S 1 Reply Last reply Reply Quote 1
                  • S
                    shreeshanthreddy @bertkuiper last edited by

                    @bertkuiper is that strategy profitable ?..
                    I am too trying same . But my ea is not opening at same time .pls reply

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

                    Online Users

                    S
                    G
                    L
                    K
                    H

                    19
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors