If he "orders"... well, that term is fraught with possibilities, isn't it?
Does he give the order as a condition for being released from detention, or to avoid being taken to jail? That, arguably, would be Deprivation of Rights under Color of Law, a criminal (not civil) violation of
18 USC 242.
Ordinarily that would be a misdemeanor, with imprisonment not to exceed one year. But in the case of police, where "such acts include the use, attempted use, or threatened use of a dangerous weapon", it's a felony, which can result in up to 10 years imprisonment.
Enforcement? Good luck. I've certainly seen many cases over the years, but generally they were excessive use of force cases, where police or corrections officers "got their rec on" with someone who was already in restraints. That's a clear cut case, contemptible, and should be prosecuted.
Merely "ordering" you to desist from a constitutionally protected activity, though, is pretty much like User said. You'll have a hard time finding a prosecutor who gives a damn.
Now, if you can make a case that it's not just the activity itself, but that you're being picked on because of "being an alien, or by reason of his color, or race," you might get some attention if you squawk loudly enough.