fxDreema

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

    How to open a BUY LIMIT or SELL LIMIT order with 3 horizontal lines.

    Questions & Answers
    4
    13
    2280
    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.
    • XYON126
      XYON126 last edited by

      Well that, I want to create a couple of buttons with 3 horizontal lines (renamed with SL, TP and Price) previously drawn in the chat that when pressing the SELL or BUY button there will be a pending operation taking the data of those 3 lines, I have already solved creating the buttons and lines, but I can't find a way that the pending order will be given to me with the data of the lines. Can somebody help me.

      TipsyWisdom 1 Reply Last reply Reply Quote 0
      • TipsyWisdom
        TipsyWisdom @XYON126 last edited by

        @xyon126 share the portion you have already created? I suspect using the same data will be the solution

        XYON126 1 Reply Last reply Reply Quote 0
        • XYON126
          XYON126 @TipsyWisdom last edited by

          Hi @tipsywisdom! As you will see when pressing the yellow button the two lines are created, the red is the SL and the yellow the price, (up to here OK) I move them where I want the order to be opened and when pressing the green or red button it remains pressed and neither will open the operation, nor will it erase the lines with which I deduce that it is blocked but I don't know where. I have read the errors and in one button it does not say anything and in the other it gives error (3) of parameters and in an undefined loop.

          You can help me, here is the Link

          https://fxdreema.com/shared/naxOKlQ3e

          TipsyWisdom J 2 Replies Last reply Reply Quote 0
          • TipsyWisdom
            TipsyWisdom @XYON126 last edited by

            @xyon126 dang, that one just by reading your explanation is above my level, but I will take a look shortly. I will also post this is my discord for one of the other gents to take a look!

            1 Reply Last reply Reply Quote 0
            • J
              Johntyr @XYON126 last edited by

              Hi @xyon126 , I suggest moving everything from on Tick to on Chart and use Mouse clicked on object to activate your trades. Hope this helps.

              https://fxdreema.com/shared/9GlSyJbid

              0_1627364045432_8d907c22-e4da-4566-aca2-d9e797b5c58a-image.png

              XYON126 1 Reply Last reply Reply Quote 1
              • TipsyWisdom
                TipsyWisdom last edited by

                ah nice, good thinking

                1 Reply Last reply Reply Quote 0
                • XYON126
                  XYON126 @Johntyr last edited by

                  Hi @johntyr! I look at your proposal and I get lost, because I see that instead of having 2 blocks of pending operations there are 5 without counting the canceled ones, I also see that the added ones have a TP and a fixed SL when my idea is that they are obtained with the Lines drawn, would you be so kind to pass me the clean code. Thanks a lot.

                  1 Reply Last reply Reply Quote 0
                  • J
                    Johntyr last edited by

                    Hi @XYON126, Sorry, I just dropped them on to show that the buttons work. Clean version attached.

                    https://fxdreema.com/shared/379qevLue . I have not confirmed your other blocks work.

                    XYON126 1 Reply Last reply Reply Quote 0
                    • XYON126
                      XYON126 @Johntyr last edited by

                      Hi @johntyr! Thank you very much for the help, I have tested your code and it does the same for me, the only variation that I find is that it has 3 more blocks and the location but still does not open any operation.

                      L J 2 Replies Last reply Reply Quote 0
                      • L
                        LadyDolares @XYON126 last edited by

                        @xyon126 Do you also get the error in the picture?0_1627382908557_1586647f-4091-4e02-8cfc-248af78108a2-image.png

                        TipsyWisdom 1 Reply Last reply Reply Quote 0
                        • J
                          Johntyr @XYON126 last edited by

                          @xyon126 Sorry, I forgot to remove old button blocks.

                          0_1627384377326_ec8e8322-e923-451e-9607-349a7b3458c2-image.png
                          Corrected version: https://fxdreema.com/shared/VDBCevpad

                          Sorry, I can't help with the rest as I know nothing about MQL code.

                          1 Reply Last reply Reply Quote 0
                          • TipsyWisdom
                            TipsyWisdom @LadyDolares last edited by TipsyWisdom

                            @ladydolares undeclared identifier is meaning without instructions. It doesn't have the required constants and variables if youre trying to test his project you have to save the mq5 file.

                            XYON126 1 Reply Last reply Reply Quote 0
                            • XYON126
                              XYON126 @TipsyWisdom last edited by

                              @tipsywisdom No, no, it is not Mql5 it is Mql4, they are not 100% compatible, there are blocks in Mql4 that do not exist in Mql5 and the same thing happens from Mql5 to Mql4.

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

                              Online Users

                              A
                              S
                              B
                              A

                              13
                              Online

                              146.7k
                              Users

                              22.4k
                              Topics

                              122.6k
                              Posts

                              Powered by NodeBB Forums | Contributors