fxDreema

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

    Understanding Chart (work) Flow

    Questions & Answers
    3
    7
    1319
    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.
    • S
      Smallous last edited by

      Hello,

      I am trying to understand the basic Chart (work) Flow.

      Assume:
      LH/RH Branch do not appear in same EA (they are side by side for comparison only).
      On Tick
      Only Conditions D & E are met.

      1. Does the Left Hand Branch reach cell 1001, jump to cell 1002, 1004, 1005, 1006 & 3000, before the next Tick?
      2. Does the Right Hand Branch reach cell 2001 & jump to cell 3000, before the next Tick?
      3. Does the Right Hand Branch reach cell 2001, jump to cell 2002, 2004, 2005, 2006 & 3000, before the next Tick?

      Regards
      Paul

      ......
      Chart flow.jpg

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

        In the output MQL4/MQL5 code all blocks are functions, all connections are function calls. At the end of each function there are function calls to the next functions (blocks) connected after the current one. What happens when you run a function which at it's end runs another function 🙂 Chain reaction. It goes this way until there is no function to call.

        1. Yes, but it depends which condition is true or false. The thing is, you always reach the possible end of the branch. Well, if there is something slow to do (buying or selling, delays), maybe few ticks will be skipped. But normally conditions are checked really really fast.
        2. Because 3000 is alone, the block will not even be included in the final project. This is a rule I started with. These alone blocks are "for later use"
        3. Yes. Whatever is possible to run, it runs within the same tick. Again, 3000 will never run, because it's not used.

        Some people think that if a block can't pass, the EA will sit there and wait while it passes. But it does not work this way.

        1 Reply Last reply Reply Quote 0
        • D
          dscoles last edited by

          I am a bit confused by the answer.

          What causes blocks 1000 and 2000 to both be included in the build, but 3000 excluded? Is it the location (close to the top)?

          Thanks

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

            It's not the location, it's my decision. When the EA is generated it first excludes all blocks that are left alone. Again, because my initial idea was to be able to keep some blocks around like this for "later use".

            Now I don't like this concept very much, because when I left few blocks like this, I just forget what was their idea. So I am thinking to make those blocks to run and keep blocks for "later use" somewhere else, in some isolated field... if anyone needs that at all.

            Also, I am thinking to remove block numbers. Now what matters (when connected in parallel) is the number of the block - the one with lower number will run first. But what if the block on left (or top) runs first? This is something that I didn't tried yet, but I will eventually do.

            1 Reply Last reply Reply Quote 0
            • S
              Smallous last edited by

              Thanks very much.

              I forgot to connect a Pass Block to Block 3000 in the diagram. I created a small EA to test both Branches separately to confirm that both branches work the same way. I have created EAs using both styles and I started to question if I was doing it correctly.

              Hopefully this will help others understand.

              Thoughts on Numbering System

              1. The main problem I have with the Numbering system is I am constantly manually correcting the number sequence. If I insert or delete a Block from an existing 'chain' it would be great if the numbers would update automatically. If I attempted to create a new separate Block with an existing number, perhaps a "are you sure" before the numbers were automatically updated would be a good idea.

              2. A potential problem with 'inferred work flow' within a 'chain' is that it might force you to have messy looking diagrams as you are restricted in where you can position the Blocks.

              3. The numbers do provide a great help in understanding workflow. Removing them may make it harder to understand, especially if more than one person is working on the EA.

              I am very pleased with the product and certainly would not want to consider coding EAs directly at this stage.

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

                __
                I must admit I originally thought that once entering a 'chain', the EA would stop if it failed a Condition, then jump to the next 'chain' according the Number. This felt logical, but I soon realised it did not work this way.
                [/quote:78ewjnqs]
                But it works that way. Numbers normally does not matter. Only when you have parallel connections, when you have 2 or more paths ahead, only then the first path to be taken it the one with lower number.

                1 Reply Last reply Reply Quote 0
                • S
                  Smallous last edited by


                  I must admit I originally thought that once entering a 'chain', the EA would stop if it failed a Condition, then jump to the next 'chain' according the Number. This felt logical, but I soon realised it did not work this way.
                  [/quote:3cfik6bu]
                  But it works that way. Numbers normally does not matter. Only when you have parallel connections, when you have 2 or more paths ahead, only then the first path to be taken it the one with lower number.[/quote:3cfik6bu]

                  Sorry, I don't think I described what I meant very well. I have edited the post and taken that line out. Can you delete this post an your last one I have quoted please.

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

                  Online Users

                  S
                  L
                  N
                  Q
                  A
                  F
                  S
                  T
                  A
                  P

                  14
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors