fxDreema

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

    Repeat blocks until one gives true

    Questions & Answers
    3
    10
    1883
    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.
    • A
      Aizen last edited by

      I try to make virtual order after crossover. With two formulas I calculate my TP and SL values. Then I want that two condition blocks would run until one gives true, one block for TP other for SL. For now I try to visualize it by printing label when TP or SL occurs to see if it is working correctly. How to make it work? link text

      1 Reply Last reply Reply Quote 0
      • A
        Aizen last edited by Aizen

        After searching a bit I found "wait to pass" option and "set flags" as alternative. I tried to make it work with "set flags" https://fxdreema.com/shared/onl0NkfMb but it looks bulky. At first I tried "check flag" block set as "wait to pass" but i don't know if it is waiting for "true" outcome or else. And It does not change back-testing result if I remove it.

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

          What if you create some object at some time, for example horizontal line, and then when the price crosses that object you create a new trade. This sounds to me like a virtual pending order 🙂

          1 Reply Last reply Reply Quote 0
          • A
            Aizen last edited by

            But drawing objects on chart would be efficient when back testing?

            1 Reply Last reply Reply Quote 0
            • A
              Aizen last edited by Aizen

              My final solution to turn on and off blocks.
              0_1502774521204_Screenshot_3.png

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

                I would make it simple as this:
                https://fxdreema.com/shared/uMSCVTa6c
                dunno if it works 😄

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

                  I think this option would give unstable results, because there is possibility that once per bar and condition blocks might pass before once per tick block. Especially when low time frames and MA values.

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

                    You see, the once per tick creates a loop? It never passes before the first conditions

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

                      No, it don't create loop, because after one millisecond of waiting once per tick block return negative (yellow) output and loop will not continue. I Tried loops without tick filter and they crash mt4 😄

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

                        oh, youre right 😄

                        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
                        • 1 / 1
                        • First post
                          Last post

                        Online Users

                        F
                        C
                        A
                        E

                        12
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors