A diverter valve controls input of two different extruded materials to a mold. A valve body has an axially extending opening, and a valve
piston is axially movable in the opening between first and second positions. The body defines a first inlet for receiving a first material, and a second inlet for receiving a second material with first and second outlets opposite the inlets. A first flushing channel communicates with the first inlet and end ports, a second flushing channel communicates with the second inlet and end ports, and a third flushing channel opposite the first two communicates with the second outlet and includes a plurality of ports, with all the ports, inlets and outlets open to the axial opening. The
piston has first and second through channels and first and second cross-over channels, each with inlet side and outlet side ports. In the first position, the first through channel connects the first inlet with the first outlet and the second through channel connects the second inlet with the second outlet, the valve
piston blocks the end ports of the first flushing channel, and the first and second cross-over channels connect the second and third flushing channels to allow flow of material therein from the second inlet. In the second position, the first cross-over channel connects the first inlet with the second outlet and the second cross-over channel connects the second inlet with the first outlet, the valve piston blocks the end ports of the first flushing channel, and the first and second through channels connect the first and third flushing channels to allow flow of material therein from the first inlet.