Yes, the President’s tweets count as legitimate orders, no matter how confusing they seem
"The president could have called the Secretary immediately and said, 'I have decided against waiting. I want every transgender person in the armed forces discharged within 48 hours.'"