Bad news for the economy was bullish news for precious metal futures this week, as gold prices soared to their highest levels in almost three years and the dollar skidded to new lows against foreign currencies.

While gold and platinum reached life-of-contract highs during the period, silver futures scored their best gains in months.

Metals analysts cited fears that the Mideast situation was worsening, accentuated by the Carter administration's plan to sell military planes to Arab countries, as contributing to the strength.

But the major stimulant came from the downside of the dollar and "the possibility that U.S. Treasury is either unwilling or incapable of doing anything about it," said an analyst.

Precious metals traded lower on yesterday, whittled by profit taking before the holiday weekend and indications by a Federal Reserve official that the U.S. would "combat disorder" on foreign exchange markets by intervening on behalf of the dollar.

In other commodities, nearby coffee futures plummeted about 10 cents a pound during the week as Brazil and Colombia appeared on the verge of offering large coffee buyers long-term contracts at lower prices.

Pork bellies suffered a lapse, but not before the bacon futures tallied their highest prices since late 1976. Traders taking their profits, plus lower hog prices, contributed to the decline.

Soybean contracts at the Chicago Board of Trade gained an average of 10 cents a bushel for the period, but most grain futures finished with small losses.

The relative strength in soybeans was generated by a good demand in Europe that was traced partly to anticipation that a coal shortage might necessitate production cutbacks by U.S. soybean processors.

By the end of the week, soybean futures had gained 8 to 11 1/4 cents compared to the preceding week's close, with March contracts quoted at $5.70 1/4 a bushe l: wheat lost 3 3/4 to 5 1/4 cents, March $2.65 1/2; corn gained 3/4 cent in nearby contracts but dropped as much as 3 cents in more distant deliveries, March $2.26 3/4; oats slumped 4 to 6 cents, March $1.25; soybean oil gained 0.55 to 0.99 cents, March 21.29 cents per pound; and soybean meal ranged from $1.20 lower to $2.50 higher, March $149.90 per ton.