This information from Colorado State University can help you better understand the flying and biting pests you are fighting.
Exerting control over the environment where horses live can go a long way toward keep flies at bay, and it is environmentally friendly. By controlling moisture in the environment as well as airflow, you can make your stable less hospitable to flies.
There are many ways to protect your horses against external parasites, but one of the most common is to use insecticides or repellents on the animal.
Biological insect control has received great acclaim in recent years as a means of avoiding the use of chemicals in the environment. One such “green” strategy is the use of predator wasps to target stable flies and houseflies, which are the majority of flies pestering your horses.
Where there are horses, there are insects. But there's also hope.