There's a candy bar war going on between Hershey and Snickers.

The fight is over prices: Snickers, the No. 1-selling candy bar in the country, went to 30 cents last month, up a nickel, while Hershey says it is "holding the line on candy bar prices."

Trouble is, some retailers decided to raise prices for all of their candies -- including those of the two other big candy manufacturers, Hershey Foods Corp. and Nabisco Brands, makers of Baby Ruth and Butterfinger.

Candy bar prices and sizes have typically moved in concert, sometimes rising in price together and other times shrinking in size together. One reason was that the companies generally buy the same raw materials -- sugar, milk and chocolate -- and thus encounter the same price increases at the same time.

But M&M/Mars Co., the company that makes Snickers, Mars, Milky Way, Three Musketeers, M&M Plain and M&M Peanut, broke with tradition last year. First, the firm announced that it was increasing the size of its bars without raising the price. That was in November 1980 when Snickers went from 1.69 ounces to 1.8 ounces. The suggested retail price of 25 cents that had been in effect since 1978 remained there.

Then, in September, M&M/Mars raised prices without increasing sizes. The 25-cent suggested price jumped to 30 cents.

Hershey was so upset by all this that it launched an advertising campaign to tell consumers that it wasn't responsible for the higher prices that some stores now charge. "We want you to know that Hershey is not raising the price of any of its candy bars," said the ad that appeared in 70 publications around the country in recent days.

Nabisco Brands, meantime, is watching the fray.

"We are aware of the situation and we are evaluating it," was the terse comment from Nabisco's Caroline Fee. She said Nabisco doesn't have any plans to raise its candy bar prices either.

The machinations on the candy bar front come just as companies prepare for the heavy sales that normally accompany Halloween.

Jos Stalenhoef, marketing director for M&M/Mars, said the September price increase was necessary to offset higher costs of operating and of ingredients. He said the bigger bars introduced last year by the company had led to increased sales and operating efficiencies and that those gains "allowed us to hold off on a price increase until now."

Stalenhoef said today's higher candy bar production costs -- from sugar costs to salaries for the salesmen pushing the candy -- made it necessary to either raise prices or reduce the size. The company raised prices. "We want to put an end to the shrinking candy bar," officials said.

And shrink it has.

In 1930, when the Snickers candy bar was introduced, it weighed 2.5 ounces and cost a nickel. The price didn't change for nearly 40 years, but by the time it did, Snickers was down to a skinny 1.16 ounces -- less than half its original weight.

Then, in 1969, there was a new standard Snickers bar. It weighed a hefty 2.3 ounces, nearly twice as much as the old one. The price was twice as much, too -- 10 cents.

More price increases followed, as Snickers climbed to 15 cents in 1973, 20 cents in 1976 and 25 cents in 1978. Other candy companies made price and weight adjustments in their bars at essentially the same points in recent years. But not this time.

"Our costs haven't gone up enough to justify a price increase at this time," said Susan Graham, a Hershey representative. The plain Hershey Bar has had the same 1.05 ounce weight since April 1980, she said. The suggested retail price for the bar has been 25 cents since 1978.

But Hershey Bar, which was introduced in 1898, also has had its ups and downs. It dropped from one ounce in 1921 to three-fourths of an ounce in 1968. The size doubled in 1969 to 1.5 ounces but now is back down.

"Rather than change their prices continuously, manufacturers adjust the weight," Graham said. She said the industry traditionally hadn't announced weight increases or decreases in candy bars. Until last year, that is, when M&M/Mars upset the candy cart with its new marketing strategy.

Stores selling candy bars can charge any price they want, although they typically have stuck to the retail price suggested by the candy makers. Now that practice is changing, too.

Safeway, the area's second largest supermarket chain, now charges 30 cents for a candy bar, whether it is Hershey, Butterfinger, Snickers, or others.

"We try to keep a uniform price for single candy bars, which aren't marked with a price, because it prevents confusion for the cashier and for the customers," said Safeway representative Ernest Moore.

Giant Foods Inc., the No. 1 chain here, still observes the suggested retail price for candy, however. At Giant, which has equipped all of its stores with electronic scanners to ring up prices automatically, the Snickers cost 30 cents. But the Hershey Bar and the Baby Ruth are 25 cents each.