An optimist would be quick to say that Baltimore has come back before, that the Orioles appeared to be down and out as recently as 1982 but were in the American League East race to the last day of the season.

But as Baltimore enters the second half of the 1985 season today, in fourth place in the AL East and 7 1/2 games out of first place, the Orioles find problems they didn't have in '82 and one problem they haven't had in 30 years, which could keep optimism at arm's length.

Pitching, which has been the primary constant of the franchise, has been way off traditional form. The staff's earned run average of 4.38 is the highest it's been at the All-Star break since 1956. Even then, the Orioles had three pitchers with ERAs below 4.00. Now, there are only two; both are relief pitchers and one of them -- Nate Snell -- is on the disabled list. Only four of 26 teams in the major leagues have a higher ERA than Baltimore.

And this is only the fourth time in the last 17 years that Baltimore has been lower than third place at the All-Star break. Three years ago, when the Orioles started a comeback, they were only 3 1/2 games out, and they trailed only two teams, Milwaukee and Boston.

Now, the Orioles are one loss out of fifth place and trail the defending champions (Detroit), the hottest team in baseball (New York) and a team that has been in first place the last two months (Toronto).

Edward Bennett Williams, the team's owner, acknowledged yesterday, "We're certainly in the toughest division. But we're not out of the race by any means."

Williams indicated the Orioles probably would not make any more changes on their roster, which has been in a state of flux since last offseason. Just having a settled roster is one of Williams' convincing arguments that the Orioles can come back to challenge for a division title.

"I don't think there's anybody out there who can help us," Williams said. "We have young John Habyan (10-1, 2.81 ERA at Class AA Charlotte) down below, but we certainly don't want to rush any of our youngsters.

"And to tell you the truth, I hope we can just settle down now and go with what we have. We were really just getting our act together the first half, with the new players we had. And I think we'll see (Manager) Earl Weaver, now, with his hand firmly on the tiller. We're going to be all right."

Because the Orioles have so many bright spots offensively, their fourth-place standing is hard to explain. They lead the majors in home runs with 105 and are tied with the Yankees for the lead in runs scored with 432.

Two of the Orioles' three free agents have played better than the team probably expected. Right fielder Lee Lacy is fourth in the AL in batting average, at .325, and his 17-game hitting streak is the league's third-longest this season. Also, he has misplayed only one ball all season and has not committed an error. Center fielder Fred Lynn, who hasn't had 30 home runs or 100 runs batted in since 1979, is on a pace that could enable him to reach both figures this year.

Floyd Rayford, in his catcher-third base utility role, is hitting .329. Catcher Rick Dempsey, who has averaged .239 and 37 RBI per year in eight seasons with the Orioles, is hitting .255 with 30 RBI. And outfielder Mike Young is up to .266 with eight home runs.

The Orioles probably will benefit from an increase in production from all-stars Eddie Murray, who is 25 points below his career average, and Cal Ripken, who is 11 points below his. Neither was of much help to the AL in Tuesday's All-Star Game, though, as the AL lost to the National League, 6-1.

All the hitting won't help the Orioles if their pitching isn't resurrected in the second half. Of six pitchers who also were with the team last season, five had ERAs lower than 4.00 in 1984. So far this year, four of those five are above 4.00.

Tippy Martinez, who is having trouble again with tendinitis, received a cortisone shot Sunday and may go on the disabled list. Mike Boddicker, who had a career ERA of 2.89 coming into the season, is at 4.04 this season, and that's the third best mark on the staff. Two of the starters, Storm Davis and Dennis Martinez, have ERAs above 5.00.

That's why the Orioles are putting so much hope into the return from the disabled list of Mike Flanagan, who after pitching in a light, selected workout Monday, appears ready to pitch against Kansas City Saturday.

"We're hoping for better things from the staff in the second half," Williams said. "I think Flanagan's return will mean a lot . . . I really feel we're going to be all right."