fxDreema

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

    Restart ea

    Questions & Answers
    3
    10
    4500
    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.
    • timmyhanke
      timmyhanke last edited by

      Is there a way to make the ea to restart itself after lets say profits has been closed ?

      because in most of my ea's i work with alot of orders along a large moving candle , but after the profit has closed it starts to loose track ,

      So if the reset part can be done i was thinking of adding a filter that it dosnt trade when the body of a candle is above x pips and then restart on every profit close , so in my insane mind it would be able to trade along a big candle and if that candle drops to the required amount of pips on the candle body it will do the same thing again and again .

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

        hmm... how about using the trade group number, set it as a variable - when you need to "restart", increase that variable by +1, so the group number will be different from there on

        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

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

          @roar

          hmmm that might work acutally , was hoping to hear your side of it 😉

          Thought of a solution that might work , if no trades - check if the body is below 10 pips set flag trading to true otherwise set it to false . that might work .

          Or trade close - set flag to true - terminate and in deinit set flag to false , i dont know it that would save the complete terminate block though haha 😉

          1 Reply Last reply Reply Quote 1
          • timmyhanke
            timmyhanke @roar last edited by timmyhanke

            @roar

            https://fxdreema.com/shared/ZupRJjCQc

            Made it like this and it seems to work wonders actually 😉

            its always nice to have someone to throw ideas at , not only to get a solution to the problem but to make the brain to maybe find the solution by itself 🙂

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

              haha, I agree on that 😄

              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

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

                @roar

                I came up with an simple idea of how to restart the ea , I used when trades closed- no trades - apply template .
                But the first day i got an insane result , but now it seems to restart some , and other charts the ea is simply deleted .
                tried terminate as well but that spams termination messages on the platform , and didnt really work .
                It should work as it is now , but it messes up and i dont know why ..

                Can you see a wrong with my strategy ?

                https://fxdreema.com/shared/ignMmyDvc

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

                  @timmyhanke
                  Nice work 😄
                  I haven't done anything similar to this, and can't spot any obvious mistakes in the logic..

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

                    There is a function to kill the EA - https://www.mql5.com/en/docs/common/expertremove - but I don't know how to restart it

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

                      @fxDreema

                      Thank you for your suggestion, but wont apply template do the same , when the ea is inside template already , so it reloads the ea when the trades are closed 🙂

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

                        I think it depends on what kind of restart he needs. Because the EA restarts also when you modify its properties, but this restart is not full restart and some global variables still keep their values.

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

                        Online Users

                        V
                        O
                        J
                        B

                        33
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors