@René Balke hello Rene i made changes to my code it has successfully compiled, and it successfully drawn the rectangular shape the problem now is instead of drawing the rectangular in the area where a squeeze occurs it draws it on top left corner. to be precise i have iterated over the bars so that i could get coordinates for the rectangle i have used iTime() to get values for the x-axis // Calculate the X-axis coordinates based on the time. datetime rectTimeLeft = iTime(_Symbol, PERIOD_CURRENT, rectLeft); datetime rectTimeRight = iTime(_Symbol, PERIOD_CURRENT, rectRight); and it still show weird looking rectangle and not what i had in mind Any suggestions to tackle this one greatly appreciated thank you. ,I have attached the source code and a picture of the object in silver.