The downward slide of both the stock market and the dollar were temporarily reversed yesterday following an unusual statement by President Reagan, who said the U.S. currency has fallen far enough on foreign exchange markets.

The president's comments contradicted the Treasury Department's position of last week, however, adding to the market's confusion about the administration's policy in the aftermath of the stock market's collapse. At the end of the day the stock market closed lower, while the dollar gained ground against other major currencies.

The Dow Jones industrial average, which measures price changes for 30 blue chip stocks on the New York Stock Exchange, was down as much as 44 points before Reagan spoke, but then rebounded. Much of the gain was lost during the late afternoon, and the Dow closed down slightly more than 22 points.

Traders on both stock and foreign exchange markets had to cope with a mix of signals about the administration's policy. Stocks followed the dollar lower early in the day in reaction to a newspaper report quoting anonymous officials as saying the administration wanted the dollar to "drift, drift, drift, drift." The White House then issued a number of disclaimers, the strongest of which came from the president.

In response to questions from reporters at the start of a meeting with visiting Israeli President Chaim Herzog, Reagan said: "We're not doing anything to bring it {the dollar} down. I don't look for a further decline, don't want a further decline from where it is right now."

Reagan went beyond the brief, carefully worded comment that the administration initially offered, prompting White House press spokesman Marlin Fitzwater to observe that, "The president's comments were on his own."

Reagan's remarks came on the heels of statements last week by Treasury Secretary James A. Baker III that sent the dollar's value tumbling.

Baker said that in the aftermath of the stock market plunge last month, the administration was giving top priority to keeping interest rates down even if that causes the dollar to fall further.

While lower U.S. interest rates lessen the risk of a recession in this country, they tend to make the dollar weaker by making dollar investments less attractive to foreigners.

Baker's comments were seen as putting pressure on the Federal Reserve to keep pumping enough cash into the economy to assure low interest rates.

On Monday, Federal Reserve Governor Edward J. Kelley Jr. appeared to take issue with the thrust of Baker's comments, saying the dollar "is in a good range" and warning that policymakers must keep inflation in check as well as acting to prevent a recession.

Adding to the confusion over administration policy yesterday, Commerce Secretary C. William Verity told the National Press Club that "the marketplace will determine the level of the dollar. We can do a lot of things, and we will. But in the end, the marketplace will determine" the exchange value of the dollar.

The Treasury Department -- which is responsible for supervising the administration's policy on the dollar -- refused comment yesterday, saying only that it had participated in drafting a formal statement issued by the White House, and in a subsequent comment by Fitzwater after Reagan's comment. A Treasury spokeswoman refused any comment on Verity's remarks.

The story that the White House attempted to discredit was published on an inside page of The New York Times. It said that administration officials, who would not permit the use of their names, "agreed that they welcomed a weaker dollar, although how much weaker they would not say."

Nevertheless, an anxious foreign exchange market reacted negatively. The dollar plunged to record lows for the fifth consecutive day, to 133.15 yen and 1.6485 German marks, before rebounding in response to Reagan's remarks.

At the close, the dollar stood at 134.55 yen and 1.6640 marks, both up slightly from Monday's close.

{The dollar rebounded on the Tokyo market today, responding to Reagan's remarks, The Associated Press reported. The dollar opened at 134.80 yen, up from yesterday's close of 133.65 yen, a record low since the modern exchange rate system was set up in the late 1940s. By midmorning, the dollar fell and was trading around 134.55 yen.}

The dollar was also helped by unconfirmed reports that the Federal Reserve had intervened yesterday with other banks. And with a U.S. holiday today and a report on the U.S. trade performance in September due Thursday, some traders who were bearish on the dollar and had sold short were ready to "cover" their positions, buying dollars and strengthening the currency.

As the dollar dropped yesterday morning, carrying the stock market down with it, administration officials scrambled to devise a press strategy.

Baker interrupted his negotiations with Congress over a deficit reduction package to confer with White House chief of staff Howard H. Baker Jr. and Fitzwater on how to deal with press inquiries.

Fitzwater rejected reporters' suggestions that the administration was sending conflicting signals. "We certainly don't want to send that signal," he said.

Fitzwater said he was skittish about making any comments about the dollar because "reporting of it always tends to be stronger than the purpose or policy in action.

"I would hope there has not been anxiety caused by any statements that have been made," he added. "We have been very careful to try to use the same language in making all of these statements." Fitzwater then emphasized: "We are not seeking a lower level of the dollar."

The formal White House statement yesterday, issued after consultation with James Baker, said: "The unnamed White House and administration officials quoted in today's New York Times article on the dollar were not speaking for the administration. The United States continues to cooperate closely with its G-7 allies to promote exchange rate stability."

The G-7, or Group of Seven, are the major industrialized nations -- the United States, Japan, Germany, France, Britain, Canada and Italy -- who have pledged to stabilize the dollar at levels far higher than now.