In the roller coaster of presidential politics, it has always been easy to tell whether Ronald Reagan is up or down.

As an old friend once put it, "when you cut Ron, he bleeds." And when he is happy, he smiles or shouts or talks on and on to friendly audiences.

Last week, the Republican nominee was up -- sky high, in fact, for the first time since the heady days of early August, when the polls showed him with a huge but illusory lead over President Carter.

"We've had some good days," Reagan told aides after campaigning successfully before blue-collar crowds in New York, New Jersey and Pennsylvania.

With four weeks to go before the election, Reagan was buoyed by private and public polls showing him ahead in eight of 11 key states, bolstered by the improved performance of aides on his campaign plane and heartened by what he thought were signs of nervousness in the Carter camp.

"He's confident with the rhythm of the campaign," said Michael K. Deaver, a longtime confidant who directs the campaign tour. "You can feel the change of mood aboard the plane. We've flip-flopped from a month ago. Now it's the Reagan campaign that feels confidence and the other side which is showing desperation."

Whether or not this estimate of the Carter campaign is accurate, here is no question that the Reagan effort has come a long way since the dark days of early September.

After two weeks of verbal slumbles, culminating in Reagan's crude Labor Day suggestion that Carter was somehow sympathetic to the Ku Klux Klan, the GOP presidential campaign was in near panic. Reagan began to blame the press for his missatatements, and the various factions at Reagan headquarters in Arlington blamed each other or the candidate.

But the campaign stabilized quickly after political troubleshooter Stu Spencer went aboard Reagan's plane on Sept. 4. It advanced dramatically in the week following Reagan's nationally televised joint appearance with independent candidate John B. Anderson in Baltimore Sept. 21.

And it surged again last week, when Reagan finally decided to abide by the recommendation of his strategists and quit replying personally to suggestions by Carter that Reagan policies would lead to nuclear war.

By common agreement, the biggest difference is Spencer.

"Stu has been of immeasurable help in smoothing down some of the rough edges," said Deaver, who until recently was no Spencer fan.

Spencer, a southern California political consultant associated with the first Reagan gubernatorial campaign in 1966, had been considered a renegage for serving as Gerald R. Ford's strategist four years ago. The 1976 campaign left hard feelings with Reagan and Deaver, especially over a television ad in the California primary that concluded: "Remember, Gov. Reagan couldn't start a war. President Reagan can."

But when Reagan is in trouble, he typically turns to those who were with him at the political creation. In late August, while he was floundering, Reagan and his wife, Nancy, met with Spencer at their rented estate at Wexford and asked him to come aboard. Spencer complied, and quickly filled a void that had been present since Reagan fired campaign manager John P. Sears and political director Charles Black on the day of the New Hampshire primary.

Reagan felt more comfortable with Sears gone, but he was left with aides and friends who, for the most part, lacked political savvy or national political experience or both. In Spencer, sometimes called the "damage-control center," the candidate found the best of both worlds -- a political professional whom he also likes.

Thirty days can be an eternity in a presidential campaign. In that time, a tight team has developed on the Reagan plane: Deaver, Spencer, former Nixon sppechwriter Ken Khachigian, and economic adviser Martin Anderson. These Californians have been joined by issues researcher James Brady, formerly the press secretary for John B. Connally, and Joe Canzeri, a Deaver deputy who was a trusted aide of the late Nelson A. Rockefeller.

Last week this traveling team was joined on the road by two specialists from Arlington headquarters -- pollster Richard B. Wirthlin and Northeast political coordinator Keith L. Blen.

With Reagan sinking in every survey at the beginning of September, his advisers tried to keep him away from the press and restrict the number of "ad-lib" inserts in his speeches.

Gradually, this cocoon has been replaced by an environment of only semi-isolation. Last week Reagan used a lot of ad libs, granted a few interviews and even answered questions from reporters at the Lynchburg, Va. airport. This week he is expected to hold a news conference.

Both Deaver and Spencer say they believe that joint appearance with Anderson was a turning point for Reagan. They say that the three days of preparation for this meeting sharpened Reagan on the issues and that the generally positive response to Reagan's performance instilled the candidate with new confidence.

The third element of Reagan's recovery was the strategy, which Reagan initially resisted, of not replying personally to Carter's attacks. Though Reagan was angry about Carter's imputations that he was a racist or a warmonger, he was pleased when surveys did not appear to be catching on with the voters.

Last week Reagan stuck to his basic economic themes, and largely ignored what Carter was saying. When he did take notice of the president, as in a speech to New York construction workers, he ridiculed him by saying, "I'm sorry I'm late, but I've been too busy making nuclear war and cutting Social Security."

The workers responded with laughter and applause.

Reagan's efforts to stay with his own campaign themes have been further encouraged by Wirthlin surveys, which put him ahead in all the states Ford carried in 1976 except Illinois and Connecticut. He is also ahead or even with the president in a dozen states that Carter carried, including the big prizes of Texas, Ohio and Pennsylvania. And when Reagan campaigned last week in New Jersey, Pennsylvania and Wisconsin, he was greeted by outside polls showing him abead in all three states.

None of this means that Reagan is home free, or that all the campaign problems have been solved.

But for the most part, the campaign has run smoothly, and Reagan's strategists are convinced that they have solved many of the logistics problems that have plagued them since the spring.

The one abiding worry on the Reagan plane is that some international event will arise that will turn American votes away from the economic issues and prompt them to rally behind the president.

"We win this election if nothing happens overseas," says Spencer.

The challenger believes, as his polls are telling him, that he is winning. But these same surveys show that the Reagan lead is as soft as it is wide.

Lurking behind the early October optimism is the fear of the late October surprise.