fxDreema

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

    check the number of open and pending operations

    General Discussions
    2
    7
    1438
    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.
    • C
      cesardefez last edited by

      Hi, I have seen a broque that checks the trade count and another one that checks the order count.
      but this broque compares it to me with a number, (that is: ==,>, <, ¡=).
      What I cannot find, or do not know how to put in variables,
      n sell operations
      n buy operations
      n sell stop
      n buy stop

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

        @cesardefez if you dont care if theyre runnig trades or pending orders, use function OrdersTotal() to get that value.
        https://docs.mql4.com/trading/orderstotal

        If you need to separate running trades and pending orders, you have to use "for each trade" loop and just count the loop iterations into some variable.

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

          309/5000
          place a variable and update each time you make a buy or sell order, it would be simple if it were direct orders. But in my EA, I place 30 buy stop and 30 sell stop orders. I don't know where to put the counter. And if I am interested in knowing how many buy orders are opened and how many sell orders are opened.

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

            @cesardefez for example, this one counts the sell pending orders.
            0_1603545128352_b7b92d5d-5696-4ca5-bb7c-bd130eee23d5-image.png

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

              0_1603547592551_e54e46bd-1fa4-4ba8-b469-63af9917f334-image.png
              Supposedly this will tell me the open buy operations?
              Out of curiosity, I have never known what the unlocking panel of the variables was for, I understand, correct me if I am wrong, the white circle is the default value of the variable V1, the red circle, V + 1 increases by 1 and updates the variable V1 . What is the circle for
              yellow??
              0_1603547981102_d7684830-b164-40e1-b81f-850c16d9b5f3-image.png

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

                @cesardefez yes, thats correct for buys. Just change v to V, its case-sensitive.

                Here's explanation of the variables box
                https://fxdreema.com/forum/topic/10894/scan-historical-data-for-conditions-values/8

                In a case of loop block, orange happens on each loop iteration, yellow happens after the loop has completed. See block information
                0_1603549134642_8b5812da-4b48-49c7-ab8b-39d3c7d40f68-image.png

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

                  THANK YOU VERY MUCH, Today I have learned a lot, it is these details that make it get its full potential.
                  thanks

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

                  Online Users

                  J
                  M
                  G
                  J

                  13
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors