NEW YORK, JULY 15 -- The stock market turned in a mixed showing in active trading today, buffeted by alternating bouts of buying and profit taking after Tuesday's rise to record levels.

The Dow Jones average of 30 industrials, down about 15 points in early trading and up more than 10 at midsession, closed with a 2.39-point gain at a new high of 2483.74.

Volume on the New York Stock Exchange reached 202.29 million shares, up from 185.85 million in the previous session.

The session got off to a weak start in the wake of the Commerce Department report that the nation's trade deficit widened in May to $14.40 billion from $13.32 billion the month before.

The news surprised many Wall Streeters after conjecture had spread on Tuesday that the gap between imports and exports might have narrowed to as little as $11 billion.

The dollar fell in foreign exchange, and interest rates climbed in the credit markets. Prices of long-term government bonds, which move in the opposite direction from interest rates, dropped about $10 for every $1,000 in face value.

Stocks began to recover by midmorning. Analysts said traders still seemed to be focusing on the strong corporate earnings reports that helped the market reach record highs on Tuesday.

The Dow Jones industrial average pushed close to the 2500 mark at one stage, but then backed off again.

Many Wall Streeters believe the 2500 level may represent a stubborn psychological obstacle for the bull market as it approaches its fifth anniversary.

Texaco by itself accounted for the Dow Jones industrial average's gain today, rising 3 1/2 to 47 1/4 amid mounting speculation that a settlement might be at hand in the company's legal dispute with Pennzoil over the acquisition of Getty Oil.

Northwestern Steel & Wire jumped 2 1/2 to 23 1/8. The company said it retained an investment banking firm to evaluate such possibilities as a sale or restructuring.

Telex fell 5 to 69 3/4. The company said earnings for its latest fiscal quarter would be higher than in the like period a year ago, but below many analysts' estimates.

Teledyne, which reported slightly lower second-quarter profits, dropped 14 3/4 to 357 1/2.

ITT Corp. rose 5/8 to 62. The company reported second-quarter earnings of $1.73 a share, up from $1.05 in the comparable period last year.

Declining issues slightly outnumbered advances in the overall tally on the NYSE. The exchange's composite index dipped 0.09 to 174.58.