Highlights A novel meal detection and meal bolusing algorithm is developed. The developed system uses only continuous glucose monitoring measurements in real time. The algorithm is tested in both simulation and clinical environments. Hyperglycemia is decreased significantly. A new module for the integrated multivariable adaptive artificial pancreas.