If a semitrailer must be parked on the shoulder of a two-way roadway and flags are being used in the place of lighted lamps, the flags should be placed:

If lighted lamps are not required to be used during an emergency stop, they should be replaced by two red flags. If a semitrailer must be parked on the shoulder of a two-way roadway and flags are being used in the place of lighted lamps, the flags should be placed 100 feet in front of and behind the vehicle.
DMV Writen Test