The artificial pancreas (AP) is a system intended to control blood glucose levels through automated insulin infusion, reducing the burden of subjects with type 1 diabetes to manage their condition. To increase patients’ safety, some systems limit the allowed amount of insulin active in the body, known as insulin-on-board (IOB). The safety auxiliary feedback element (SAFE) layer has been designed previously to avoid overreaction of the controller and thus avoiding hypoglycemia. In this work, a new method, so-called “dynamic rule-based algorithm,” is presented in order to adjust the limits of IOB in real time. The algorithm is an extension of a previously designed method which aimed to adjust the limits of IOB for a meal with 60 grams of carbohydrates (CHO). The proposed method is intended to be applied on hybrid AP systems during 24 h operation. It has been designed by combining two different strategies to set IOB limits for different situations: (1) fasting periods and (2) postprandial periods, regardless of the size of the meal. The UVa/Padova simulator is considered to assess the performance of the method, considering challenging scenarios. In silico results showed that the method is able to reduce the time spent in hypoglycemic range, improving patients’ safety, which reveals the feasibility of the approach to be included in different control algorithms.