AC: Improve algorithm that defines iterations in Forecast chart