This script automatically draws rectangles around bars inside IB pattern. Note :: because Pinescript does not allow changes to already drawn charts on historical bars, checkbox "show only last box" doesn't work for arrows