fxDreema

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

    Less than "n" trades are running

    Questions & Answers
    2
    10
    2447
    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
      james last edited by

      I have set a "Less than "n" trades are running" block up at the top of my buy/sell tree, with the "Less than" entry pointing to a variable in the Variables list called "Less_n_Trades". This value is set to 3.

      I understood, therefore that this would only allow a maximum of 2 trades to run because the help text says, "This block passes only if there are less than a number of trades currently running".

      However, running a USDJPY backtest the EA allows at least 3 trades to be open.

      Is this expected behaviour of the block?

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

        The fact is that even I am always confused with this block 🙂 But I made another one that you can try instead - "Check trades count". At least it sounds better.

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

          OK. I've now tried this with the "Check trades count" block. Again, I have a variable called "MaxTrades" set to 2. Inside the block I have "Compare <= lower than or equal to", and "Orders count" pointing to the "MaxTrades" variable.

          Unfortunately on my USDJPY pair I still get at least 3 trades running when there should only be one or two.

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

            In other words, if trades count is <= 2, then execute the next block, which is for example "Buy now". If there are 2 trades at the moment, then 2<=2 is true, so it goes to buy 3rd one. Try with "< Lower than".

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

              Of course! You are quite right - again! 🙂

              Thanks.

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

                It's amazing how there are so simple things, but our minds feel hard time to think about. This is one of these. When I have to use this block I'm always trying to explain it to myself like this "If count is... no, if trades are... ummm... how many... no, no... ummm... ok, let's start again... sooo it trades are... count is... how many?... damn, I'm stupid!" 😕

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

                  I enjoyed your last post a lot! I laughed out loud too! I must also congratulate you on your use of English. There are many people in Scotland who could learn from you! Even worse, there are many who couldn't point to Bulgaria on a map! 😞

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

                    I'm still struggling with this - sorry! 😞

                    I'm using "Check trades count" < MaxTrades (a variable which is set to 1).

                    I'm still getting 2 trades taken. I can't understand it!

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

                      I got only 1 trade here: http://fxdreema.com/shared/DZtLsRr3b

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

                        This is very strange. I made a modification to another unconnected block, and now I'm getting just 1 trade. At least its working! 🙂

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

                        Online Users

                        M
                        M
                        S
                        G
                        E
                        N
                        A
                        C
                        M
                        M
                        M
                        E

                        22
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors