Objects are not deleted
-
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?

-
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^) -
I did it as suggested, but it doesn't work.
Is this what you mean? -
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^) -
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
-
Great! Thank you.
