Unless you can adjust your pressure switch to have the pump cut-off at 70 psi or so, you are going to have to oversize this 900-foot line in order to save pressure for the heads to run near to 40 psi from a 50 psi supply. Holding the loss to around 2 psi at 18 gpm would require a 2-inch pipe size, compared to a loss of 16 psi if you used a 1-1/4 sch 40 PVC line (your material choice will depend on your location)