GORP! What's GORP, you ask? Good Old Raisins and Peanuts.
There are three main elements that make for great trail mix, but adjust to your taste:
Nuts. Peanuts are standard, but adding some cashews, almonds, pecans, walnuts-all can be great.
Dried Fruit. Raisins are the standard, but dried apricots, prunes, apples, banana chips can be great.
Candy. To get it right, there should be sparse amounts of these, just for fun and flavor; M&M's, Reese's Pieces and similar ones with candy shells are best, because they then don't melt even on a hot hiking day!
These high-energy goodies are inexpensive and travel well in your backpack.