No, the loop should begin with 0 and not with Close. If it began with Close, the grid lines would be at a different place whenever you restart the system. Beginning with a constant, such as 0, makes sure that you get the same grid lines regardless of the current price.