fxDreema

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

    Objects are not deleted

    Questions & Answers
    3
    6
    1548
    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.
    • isp00rt
      isp00rt last edited by

      I thought the block "Delete Object" would clear my chart from all arrows created by all trades open/closed, but apparently I'm missing something because it doesn't do it. I even specified by "Arrow" at the "Name contains" field, bu to no avail. Could someone please help me? 😏

      1 Reply Last reply Reply Quote 0
      • R
        Radar last edited by

        Hey Isp00rt,

        Check out the block "For each Object". Expand "Filter by Type", and for "Object type" select "Arrow" from the drop-down list...
        Connect the "Delete" block to the "For each Object" block.

        Have fun!
        Radar =8^)

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

          I did it as suggested, but it doesn't work. 😞 Is this what you mean?

          https://fxdreema.com/shared/JOfAxQIQd

          1 Reply Last reply Reply Quote 0
          • R
            Radar last edited by

            That was what I meant, yeah, but I was off the mark 😞
            The arrows for trades are created by the OrderSend() function of mt4, and cannot be deleted 😞
            You can prevent them from being created when the orders are sent by setting the final parameter of OrderSend() to CLR_NONE, (or by simply deleting the color parameter) (see https://docs.mql4.com/trading/ordersend for the format of the OrderSend() command).
            Sorry for the mis-direction 😞 I've been coding in mql4 on and off for around 4 years, and have always used a function written by someone else to send orders (it has a few extra checks before and after OrderSend()), so I always thought that function drew the arrows.

            Have fun!
            Radar =8^)

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

              I wrote CLR_NONE directly in OrderSend in the output code, but it doesn't work for me. This is the default value after all, OrderSend is designed to print those arrows when the value is CLR_NONE (or clrNone).

              The name of this arrows does not contain "Arrow". Open Objects List in MT to see the names. This now works for me: https://fxdreema.com/shared/Jer6zQQBb

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

                Great! Thank you. 😉

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

                Online Users

                G
                Q
                C
                T
                S
                A
                M
                R
                G
                G
                Y
                C

                24
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors