Battered by the selling of investors in the last months of 1979 -- particularly during October, when stock prices plummeted generally -- prime Washington area issues did not end the year with 12-month advances quite so glamorous as in recent years.

Still, the 30 local stocks charted daily by the investment firm of Johnson, Lemon & Co. Inc. rose substantially, and yearly gains exceeded those of key New York Stock Exchange barometers.

The Johnston, Lemon index closed 1979 on Monday night at 110.774, a gain of 22 percent during the year from 90.783 at the end of 1978. The index had topped 116 during August before leveling off and subsequently plunging during the October reaction to new Federal Reserve Board credit-tightening policies.

In contrast, the Dow Jones index of 30 leading NYSE stocks climbed 12.9 percent for the year to close at 121.02.

The Big Board's own composite index climbed 15.5 percent during 1979 to 61.95, also trailing the Johnston, Lemon percentage gain.

But for the second consecutive year, broad gains of American Stock Exchange issues gave the Amex index the stock market championship and a better record than that of the 30 Washington stocks measured by Johnston, Lemon. The amex price index soared 64 percent to 247.07 during 1979 after a strong 16 percent gain the previous year.

Moreover, over-the-counter stock prices also gained in value more on average during 1979 than the 30 Washington stocks. The National Association of Securities Dealers Automated Quotations (NASDAQ) index of OTC issues advanced 28 percent during 1979, closing at 151.14, not far below the record high of 152.29 last Oct. 5, just prior to the Federal Reserve announcements.

There was no clear pattern to the performance of Washington area stocks last year, although many insurance and financial issues were generally higher.

Overall, 19 stocks gained during 1979, 10 declined and one (Woodward & Lothrop) was unchanged. Johnston, Lemon analysts expect a better performance for the index stocks in the new year.

For the most part, the Washington companies posted higher profits and profit margins during the year, and many announced increased dividend rates.

The 30 stocks followed by Johnston, Lemon for its index include some issues traded on the NYSE, some from the Amex and others traded over the counter.

In terms of percentage gain for the year, Quality Inns International of Silver Spring showed the largest increase by far -- up 111 percent to $9.50 a share from $4.50 a year earlier. Fiscal 1979 earnings of the hotel chain tripled those of the previous year, revenues were higher, cash dividends were started and the company moved from OTC trading to an Amex listing.

Marriott Corp., another company with major hotel operations, also fared well last year. Its stock rose 45 percent and closed at $17.625 a share, as earnings and revenues continued to expand in line with -- or in excess of -- company projections.

Other large percentage gainers were Criterion Insurance, 79 percent; its parent firm, Geico Corp., 70 percent; Dart Drug, which expanded separate book store operations and opened a new discount auto parts chain, 69 percent; Giant Food, 41 percent; Mortgage Investors of Washington, 36 percent; and Washington Real Estate Investment Trust, 33 percent.

On the down side, the major percentage loser in 1979 was Garfinckel, Brooks Brothers, Miller & Rhoads, off 16.6 percent to $15.75, a decline some analysts attribute to investor uncertainty about Gamble-Skogmo Inc.'s 20 percent share of Garfinckel common stock.

Other losers were Potomac Electric Power Co., off 15.6 percent to $11.50 a share, at a time when utilities were in disfavor and Pepco was having difficulty in securing D.C. rate increases; United Services Life Insurance, off 14.7 percent; the Washington Post Co., down 9.7 percent; and Drug Fair, off 9.3 percent.