to me you would not have enough parameters to solve the puzzle as its purely random in which case they would have a 50/50 chance as a guess.
The odds for all to survive would be low, but you could not say they would not all guess correctly.
Nah, there's no strategy to save them ALL, but there is a strategy they could use to be certain of saving SOME of them

For example you could save at least 50% of them quite easily.
If they agree that the guy at the back of the line says the colour of the hat on the guy at the front of the line. Then he MAY die, or he MAY be saved, depending what colour his hat is - but he has told the guy at the front of the line what colour to guess when it is his turn. So the guy at the front of the line will definitely be saved.
If the guy 2nd from the back, says that his hat is the colour of the guy who is 2nd from the front, then again he may die, or he may survive, depending on luck, but he has told the guy 2nd from the front how to survive.
Rinse and repeat 5 times and the back 5 people may die, but the front 5 will definitely survive.
Not sure if this is the optimum solution or not, but it will save at least 5 of them for sure (and if they get 'lucky' then all 10 of them will survive).