fxDreema

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

    Movable buttons in MT4

    Questions & Answers
    3
    8
    3619
    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.
    • F
      Flip last edited by

      I have made a trade management tool that consists out of 6 separate buttons in MT4 (See attachment Buttons). Now they are being displayed on a fixed area in MT4. I would like to be able to move the Trade management tool around without selecting the 6 separate buttons. Is there a way to make something like an object container that contains all 6 buttons, so I can drag this container around in MT4?

      Thank you in advance.

      ......
      Buttons.png

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

        I don't know, to be honest. All "Draw... " blocks are pretty simple and they do exactly that - creating/updating objects on the chart. I don't really know how more complicated things happen

        1 Reply Last reply Reply Quote 0
        • M
          miro1360 last edited by

          you can try make one object like reference object (your rectangle) and others block x y calculated from this rectangle - after rectangle is moved - store into variables its position, and x y for buttons is calculated from this position ...

          Between trading and gambling is a very small gap, be careful.

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

            __you can try make one object like reference object (your rectangle) and others block x y calculated from this rectangle - after rectangle is moved - store into variables its position, and x y for buttons is calculated from this position ...[/quote:1dplpdqs]

            Thank you for your help. I understand your suggesting but I have no idea how to store position xy into variables as I am quite new at this. Do you maybe have an example to help get me going?

            1 Reply Last reply Reply Quote 0
            • M
              miro1360 last edited by

              try this:
              https://fxdreema.com/shared/uUwliI43c
              😉

              Between trading and gambling is a very small gap, be careful.

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

                __try this:
                https://fxdreema.com/shared/uUwliI43c
                ;)[/quote:3d7t3h71]

                Thank you very much, after some experimenting I managed to get into the right direction.
                -I created a rectangle from which xy are stored in variables;
                -Button 1 looks at these stored xy variables and uses them to reposition when rectangle is moved;

                The problem I am facing now is as following:

                • Button 1 gets it's coordinates from the xy variables, the other buttons should look at the same x-variable (which is no problem), but the y variable is different for each button.
                • So Buttons 2-6 should look at variable_y - value

                Is there a block that I can use for this, and if so which one?

                Thanks!

                ......
                Schermafbeelding 2016-09-03 om 15.42.32.png

                1 Reply Last reply Reply Quote 0
                • M
                  miro1360 last edited by

                  ____try this:
                  https://fxdreema.com/shared/uUwliI43c
                  ;)[/quote:2iph71rm]

                  Thank you very much, after some experimenting I managed to get into the right direction.
                  -I created a rectangle from which xy are stored in variables;
                  -Button 1 looks at these stored xy variables and uses them to reposition when rectangle is moved;

                  The problem I am facing now is as following:

                  • Button 1 gets it's coordinates from the xy variables, the other buttons should look at the same x-variable (which is no problem), but the y variable is different for each button.
                  • So Buttons 2-6 should look at variable_y - value

                  Is there a block that I can use for this, and if so which one?

                  Thanks![/quote:2iph71rm]

                  here for you, hope you learn something new - be aware on blocks order, numbers, etc. ... dont forget to check OnInit section and OnChart section, both are used 😄
                  https://fxdreema.com/shared/SbS1f5g0c

                  Between trading and gambling is a very small gap, be careful.

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

                    Thank you, it is working now. Learned a lot 😉

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

                    Online Users

                    S
                    A
                    R
                    B
                    N
                    M
                    A
                    T
                    V
                    M
                    A
                    A
                    R
                    S

                    26
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors