Before starting off coding your G Code files, please feel free to visit this link below for further information:
Kindly add this sequence into your G Code as follows:
M750 T opens valve for extruder 1
G4 P sets amount of delay, "P" being milliseconds (see G-Code guide)
M751 T closes valve for extruder 1
Please note that T0 stands for the first printhead, T1 for the second printhead and so on.
For further assistance regarding this matter, kindly send your queries at firstname.lastname@example.org