Need drawing to disappear once price went through it.
-
https://fxdreema.com/shared/lXUBANQPd
These are 5 bar fractals.
I need each individual drawing to disappear once price goes beyond it.
I know how to do that when it's only 1 drawing, but not in this manner with loads of drawings with the same prefix.
There can be 10 drawings with the same prefix, but only the ones that have already been broken should be deleted.
Thanks in advance for your help.
-
Use the price level and when the price goes beyond delete the object by name.
-
@jstap That works when using one drawing.
I don't think it's as simple as that in my case.
There might be 15 of the same drawing on the chart, at different price levels. Only the ones that are priced through need to disappear.
-
You need to utilize the For Each Object bloc. Then condition set to in loop instead of name. Then delete. I'm not at home to set it up but that's the ball park.
-
@JayPhillbrooks Never used loops before, but I'll give it a shot. Thanks!
-
I just saw your link.
(For each object)--> object type-->Arrow:check sign-->Arrow type: check sign-->filter by name:swing_low You can filter by color also but I recommend using different colors.
(Condition)-->Market properties (is above)-->object on chart-->Source:picked in loop.
(Delete)You may have to toy around with it to get it correct because I'm not exactly sure what you are expecting but I know that's the proper setup.
-
@JayPhillbrooks Thanks for your help. I am having an issue with it though.

I get this error for some reason.
-
Seems to only be an issue for MT5, compiles fine in MT4.
I think I'll make a bug report for it.
-
That's interesting. Is is stored as a variable?
-
@Mitchp The admin is working hard on MT5. You should let him know.
-
@JayPhillbrooks Nope, no variables
-
@l-andorrà I created a bug report and tagged admin.
-
@Mitchp Sadly, he will take days before replying. You will have to be patient.
-
Create the variable.
Do not use delete objects. That causes all of them to be deleted when price break any mark. You only want the ones deleted that price has broken so use the delete bloc under the loop for chart object section.
I don't think it's a bug or anything. Sometimes you have to tinker around with things to get it to work.
