If you're cooking on a fire, is it better to cook under the direct flame or the hot ashes?

If you're having an open fire and you want to cook something in tin foil is it better to cook above the flame or on top of the ashes?
If you're cooking on a fire, is it better to cook under the direct flame or the hot ashes?
Post Opinion