fxDreema

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

    Testing "Start Trades Loop"

    Questions & Answers
    2
    10
    2196
    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.
    • T
      Trader3487 last edited by

      Can "Start trades loop" and "in loop" be tested in mt4 backtester (in this example tested on 5-point symbol like AUDUSD)? It seems like it is not recognizing orders that are opened by ea because:

      1. it is giving different results for the following 2 examples which are actually the same ea written differently:
        http://fxdreema.com/shared/oajoGFX6d
        http://fxdreema.com/shared/SoZGpXegc

      2. it is ignoring the logic within the ea which says, if current market value (candle close[0]) is within 0.001 distance of any open order, then do not open new order but as you can see it is opening new orders within the no open zone.

      Maybe this can only be tested in the live setting or is there a flaw with the ea?

      Thanks 🙂

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

        1. It's not the same EA. The yellow output of "Start trades loop" is activated when the loop ends, no matter if there were trades or not.

        2. It is not "any open order".

        About "Start trades loop" block:

        This block loops through all trades that matches the filter settings. For each trade the next blocks are executed, and they are supposed to be blocks (from the same category) that will check the trade's attributes (stop loss, take profit...) or modify/close the trade. You can also access the attributes using "Condition" block.

        When it's all over the yellow output becomes active.

        How it Works?

        1. It checks how many trades are running at the moment.
        2. Depending on the selected loop direction it starts to load all available trades one after another (loading a trade means that it's attributes (open price, volume size...) are ready to be checked and it is prepared to be modified or closed)
        3. If the currently loaded trade matches the filter settings, the orange output is activated. Otherwise it skips the trade and it continues to the next one.
        4. The orange output of this block can be activated as many times as many trades are passed the filter settings! When you have blocks connected after this block, they are executed immediately, so the next trade will be loaded after the next blocks does their work.
        5. When all available trades are checked and the orange output was activated as many times as needed, the block goes to it's yellow output. Or basically, it goes to the yellow output always after the work is finished.
        1 Reply Last reply Reply Quote 0
        • T
          Trader3487 last edited by

          thanks for the response!

          re: 1)
          is there ever a case when orange and yellow outputs mean true and false (if true -> orange, if false -> yellow)?

          re: 2)
          if group mode is set to "All (automated and manually opened), doesn't that mean all open orders?
          are condition blocks 9 & 10 ok after the start trades loop since they are accessing order attributes?

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

            1. Yes, most of the blocks. There are only few exceptions like this block.
              This block can be considered as a "driver" - one that does things. Most of the blocks, when executed can reach one of their outputs and that's all. This block, when executed once, can reach it's orange output more than once depending on how many trades (mathcing the filter) there are.

            Ask yourself something. If you have 100 tardes (some of them buys, some of them sells) and you want to modify SL of some of them. How will you do this logically?

            1. Yes, it meand that they are not filtered by magic number. Other filters - by market and type remains. Conditions are fine.
            1 Reply Last reply Reply Quote 0
            • fxDreema
              fxDreema last edited by

              By the way I started to update blocks descriptions and names, and "Start trades loop" will be renamed, but I can't find the right word that describes the process of loading trades one after another. Suggestions? 🙂

              1 Reply Last reply Reply Quote 0
              • T
                Trader3487 last edited by

                "Start trades loop" is fine now that I have better understanding of what it does so updating the description would suffice. "Initialize Trades Loop" could also work 🙂

                1 Reply Last reply Reply Quote 0
                • T
                  Trader3487 last edited by

                  awesome! I just switched the connector coming off of "Start trades loop" from the orange to the yellow and ea is now executing correctly!!

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

                    The word "Loop" is used in programming to describe "For" loop, and "For" is used in this block so I used the word "Loop". But now I'm not sure that this word is the best, so I'm searching for a new name.

                    "Loop trades", "Trades loop", "For each trade", "Load each trade", "Trades: One by one", "Load trades one by one"...

                    I like "Loop trades" because it sounds simple, but maybe "For each trade" describes it better... 😕

                    1 Reply Last reply Reply Quote 0
                    • T
                      Trader3487 last edited by

                      I see. How about:
                      "Load trades (pre-Loop)"
                      "Initialize trades (pre-Loop)" or just "Intialize trades"
                      "Load trades (prepare loop)" or just "Prepare loop"?

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

                        I think I want to remove the "start" word from it, and the "start" meaning as well, because in fact all the next blocks are executed "inside" this one, so everything starts with it, happens in it, and also ends with it.

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

                        Online Users

                        J
                        P
                        B
                        S
                        H
                        A

                        15
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors