Resize/Reduce rectangle when price come back to rectangle area
-
Hi
I am trying to draw rectangle at x condition, and trying to resize/reduce rectangle when price comes back to its level.
e.g.
Drew a rectangle on time 00:00 hours to 01:00 hours at Highest price 100 and lowest price 0.
when price comes back to price level 50 later in between 01:01 to 23:59 hours. I want 0 - 50 to be deleted and 50-100 rectangle should be left until price again move towards that level if/whenever.
Any idea ?
Thanks..
-
You need to draw the first rectangle with those conditions. Then when the second condition is met, the bot need to delete the previous rectangle and then draw the new one.