How can I use Counter numbers to restrict logic from running
-
Hello, I want to draw just 3 FVG within a specific timeframe but using the counter n times pass block, the FvG only draws once even when i have 3 times pass number.
https://fxdreema.com/shared/hISnk1Jze
What's the better way to do this? Maybe variable count number and turn on and off block...Need your ideas
-
Are those 3 FVG supposed to happen in different moments in time? If so you need not to use that 'counter n times pass'. You need to draw them as they happen.
-
Yes, they are to happen at a different moment in time. I tried draw them but it kept drawing on and I need it to draw just 3 FVGs
-
Ok. So what you need is just watching the last three created rectangles, right?
-
yes, just three rectangle or more as I may want.
-
@tec-nacks Then you should draw all of them normally but then delete the older ones like this:

In my example the last 3 rectangles will be skipped and all the other will be deleted.
-
wow...That;s awesome...Knew I could do some wonders with FxDreema lol
What tab is this on? Int or Deint
-
figured it out. thanks
-
@l-andorrà thanks for helping but the issue faced is that once price react at the FVG it doesn't open trades because they are 3 FVGs with the same name.
Is there a way I can automatically label them differently?
with maybe a number extension for example FvG-1, FVG-2 ... on auto that first be 1 to 3
-
You can create a string variable to be positioned on the 'Filter by name' tab of the block and every time a new rectangle is created the variable is modified accordignly.
-
-
Yes, just like that. Now every time a new rectangle is drawn, modify the variable slightly in order to provide a different name. You can use numbers on a string variable. That makes it easier.
-
@l-andorrà Can you help with a sample pls? kinda stucked at that point
-
Can you please share your latest version?
-
@l-andorrà this is where am at https://fxdreema.com/shared/GbueR0BXc
-
The problem is the 'counter n pass' block. It will draw the same rectangle 3 times, not the last 3 rectangles. You should remove it and use a 'once per bar' block on top instead.
-
@l-andorrà ooh okay, will work on that.
How about the variable auto renaming ?
-
I recommend to use a number instead of a name. You can still use a string type variable. Then adding +1 to that number every time you add a new one.
-
@l-andorrà I understand you but l don't know how?
Help me with a sample pls

-
@tec-nacks I mean something like this:
https://fxdreema.com/shared/GvbFIDkSb
Each new rectangle will add +100 to the current name. That way you will be able to find them more easily.
