All three main indexes are set for weekly declines despite the S&P 500 hitting record highs twice earlier this week.