fxDreema

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

    How to enable EA to Execute Button

    Questions & Answers
    3
    13
    841
    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.
    • J
      Jim67 last edited by

      Hi all,
      Could anyone help me with how to enable the EA to automatically execute a button without me clicking it.
      I have a dashboard that has buttons that execute different functions.
      Buttons work OK when I click them, but also want the EA to execute same function if certain conditions met without me having to to be in front of chart to click the button.

      Have tried several ways to "Change Status" to 1 but can't get anything to work.

      Simple example project:
      https://fxdreema.com/shared/rnXhazwye

      Clicking "Button" (Block 10) changes button to "Button ON" (Block 12) and executes conditions attached (eg Block 13)
      Click "Button ON" (Block 15) turns button, and functions, off and returns button to "Button"

      How can get Block 30 to 34 to execute Block 10? ie if other conditions met, EA runs Block 10 etc
      Obviously just a simple example - hope it makes sense.

      Appreciate any help.
      Cheers,
      Jim

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

        @Jim67 you can execute other blocks at any point with this bad boy here
        575f0982-92f5-4ffd-a780-4f73201fe319-image.png

        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 1
        • J
          Jim67 last edited by

          Hey @roar thanks for your reply.
          I had tried Run Blocks but that only executes blocks once - whereas activating the Button will run attached blocks whilst button is on (ie waiting for next conditions to be met)
          But whilst I was redoing the example project to explain what I mean, I realised I haven't tried "Turn Blocks On"
          So will give that a go once markets re-open next week.
          Thanks again for your help mate ๐Ÿ™

          1 Reply Last reply Reply Quote 1
          • jstap
            jstap last edited by

            You can back test and check EA at any time

            Learn fxDreema Without the Wait!

            My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

            The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

            Donโ€™t miss out

            Click hereโžก๏ธ https://mybook.to/fxDreema to get your copy today!

            Enjoy! ๐Ÿ˜Š

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

              Hey @jstap Yeah I know Strategy Tester - but because mines a Dashboard with mostly manual buttons to execute things, I like to see in real time - but will try the automation side as you suggest. Thanks my man ๐Ÿ‘

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

                So @roar or @jstap,
                If there's no way for EA to enable button when I would normally after certain conditions are met, and have to use Turn Off/On Blocks .... can I ask

                in this simple example

                https://fxdreema.com/shared/JUfCuy1Rc

                once conditions in Blocks 11,12 and 13 are met and Block 2 is Turned On by Block 14 - Will Blocks 2,3 and 4 continue to run (ie waiting for their conditions to met) until Block 2 is Turned Off again by Block 6?

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

                  @Jim67 block 2 is turned off again and again on every tick

                  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
                  • J
                    Jim67 last edited by

                    That's what I was afraid of @roar
                    It would so much easier if EA could just enable a Button at Block 1.
                    So how can I get Blocks 2,3 and 4 to run until those conditions are met after Blocks 11, 12 and 13 conditions have been met?

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

                      This might work. I dont use "turn on/off" blocks myself, a boolean variable does the same thing
                      image.png

                      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
                      • J
                        Jim67 last edited by

                        Hmmm I think I'll have to learn what and how to use boolean variable - because don't want Blocks 2,3 4 to run at all until after 11,12,13.
                        Thanks @roar

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

                          So @roar something like this?....maybe?

                          https://fxdreema.com/shared/F6aP3jCKd

                          Bool Variable "First set conditions met" set to False by default - until changed to True by Block 14

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

                            @Jim67 that works. Remember to set the variable false again, after successful buy. You can use the quick variable adjust window to set the variable true or false, "modify variables" block is never needed for boolean variables.

                            6ede2e06-cae6-492a-9096-a7731af7dd4f-image.png

                            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 -1
                            • J
                              Jim67 last edited by

                              Ahh OK great
                              Many thanks @roar ๐Ÿ™
                              Love learning more about FxDreema

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

                              Online Users

                              K
                              C
                              E
                              M
                              F
                              T
                              M

                              20
                              Online

                              146.6k
                              Users

                              22.4k
                              Topics

                              122.6k
                              Posts

                              Powered by NodeBB Forums | Contributors