NEW YORK (AP) _ Five of the biggest brokerage firms said Tuesday they had indefinitely halted a computerized trading strategy that critics blame for spasms of destructive volatility in the crash-scarred stock market.

The announcements by Bear Stearns & Co., Kidder Peabody & Co., Morgan Stanley & Co., PaineWebber Inc. and Salomon Brothers Inc. marked the most aggressive voluntary step yet to calm an outcry over index arbitrage program trading.

''It is necessary for all to work toward the goal of restoring confidence in and guaranteeing the vibrancy of the marketplace,'' John Gutfreund, chairman and chief executive of Salomon, said in a statement that reflected a view expressed by the others as well.

Wall Street sources said these firms have been under enormous pressure, both from stock exchanges and their own customers, for coordinated action to control the computerized practice, which while profitable for the firms has chased many investors out of the market.

Kidder, Morgan, PaineWebber and Salomon said they had suspended index arbitrage program trading for their own accounts, although they would continue to use the strategy for customers if asked. Bear Stearns said it had suspended index arbitrage for its own account and customers as of late last week.

Although the action won't mean an end to program trading, it is expected to limit the practice significantly because the brokerages often set waves of program trading in motion with their own moves.

Opponents of program trading applauded the announcements, and some said it was immediately reflected in the behavior of the market, which absorbed the news without any sudden waves of buying or selling.

''We welcome their decision, of course,'' said Anthony A. LaCroix, chairman, president and chief executive of Advest Inc., a Hartford, Conn.- based securities firm that has urged tough restrictions on program trading. ''We think it's a right one for the capital markets in the long run, and will encourage individuals to come back to the market.''

Index arbitrage, an innovation implemented about five years ago, involves the use of computers to sell massive amounts of stocks in New York and simultaneously buy the equivalent stock-index futures traded in Chicago, or vice versa, to profit from temporary price discrepancies.

While the strategy had been credited with prodding the advance of the 1982-87 bull market, it also was blamed for contributing to the October crash and the market's subsequent volatility.

More important, critics say, program trading has frightened billions of investor dollars out of the market because it can swing prices violently without regard to a stock's real value. The result has been a severe drop in trading volume and stock underwritings.

''Any action taken by member firms to tone volatility and increase investor confidence should be applauded,'' said Richard Torrenzano, spokesman for the New York Stock Exchange, which also has taken steps to limit the influence of program trading. ''I think it's meaningful and a step in the right direction.''

Officials at some of the firms, speaking privately, said there had been extensive discussions among them about the suspensions, which was one reason why they were announced the same day.

Robert Kirby, head of a large Los Angeles money management firm and a member of the presidential commission that investigated the stock crash, said the suspensions were significant because they reflected a new willingness by big brokers to relinquish profits for the overall health of the industry.

''For a few million bucks a year, it just wasn't worth it to these guys to have everyone saying they were the ones wearing the black hats,'' said Kirby, chairman of the Capital Guardian Trust Co.

Some said pressure for the suspensions came from other operations within the firms themselves. Retail brokering and underwriting, for example, have been devastated by investor apathy since the stock crash.

''It's conceivable that the companies themselves or corporate finance people at the firms said 'Look, we've got to stop this,''' said James J. Cramer, president of the New York money management firm Cramer & Co. and an outspoken opponent of program trading.

Others said the actions reflected a growing belief in the securities industry that lawmakers would take steps aimed at restoring investor confidence unless brokerage firms could reform themselves.

''What's really developed is a tremendous fear by the Wall Street commmunity that legislators may take significant action that might be an over- reaction,'' said Jack Barbanel, a futures expert at the Gruntal & Co. investment firm in New York.

Tuesday's announcements followed similar actions by Goldman Sachs & Co., Shearson Lehman Hutton Inc., Merrill Lynch & Co. and First Boston Co. But only Goldman's was considered significant because the firm was among the biggest users of the technique.