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.
@baxishparmar Teachnically it shluld be possible but that would require a lot of complex structures. One to trnasform target profit into pips and another one to calculate pips distance from current price to target price. The first one is by far the most complex one.