A locked mode indicator for disruption prediction on JET and ASDEX upgrade