This snippet sets meta robots to noindex for past events created by The Event Calendar plugin. It works for Slim SEO only:
add_filter( 'slim_seo_robots_index', function ($value, $object_id) {
if ( ! is_singular( 'tribe_events' ) ) {
return $value;
}
$event_timestamp = strtotime( tribe_get_start_date( $object_id, false, 'Y-m-d' ) );
return $event_timestamp < strtotime( '-7 days' ) ? false : $value;
}, 10, 2 );