The continuing weakness of the U.S. dollar on world currency markets - and the prospect that this year's yawning U.S. trade deficit approaching $30 billion will be even larger in 1978 - is casting a new deep shadow of uncertainty over an already demoralized stock market.

"There has been a shift in investors focus which has gone from concern with the money supply and interest rates over to a concern with the trade deficit and the weakness of the dollar, and the implications of that action for inflation and interest rates." noted Monte Gordon. director of investment research for the Dreyfus Corp.

What seems to be worrying investors is not only the tangible impact a weakened U.S. currency could have on the domestic inflation rate through higher import prices and other more indirect pressures, but also the vague, but uneasy feeling that a prolongation of the dollars sinking spell threatens to destabilize the entire world financial order where the dollar occupies a central and special position.

"The fundamental danger of a continued weakness in the dollar is that it will add to the inflation rate," said Richard B. Worley, monetary economist with Goldman. Sachs & Co. "But there's also a feeling that all is not right with the world when the U.S. is running a $30 billion trade deficit and the dollar drops by nearly 3 per cent in a couple of months.

"On one level, it's a superficial concern - a general unease," added Worley. "And I'm not sure that everyone that's uneasy has decided what might come out of this that might be had. But it does have an adverse impact on those markets where confidence in the future is important, such as the equity markets and the longer part of the bond market."

Frenzied speculation against the dollar and heavy central bank intervention on Tuesday to stem the side contributed to the 14.12 point plunge on the Dow Jones industrial average, the largest drop in four months. Yesterday the dollar again brushed new yearly low against major European currencies, but moderated after dealers predicted some near-term stabilization. And the Dow Jones registered a slim 0.52 gain, based partly on this optimism.

However, there is as yet little confidence in the predictions that the dollar's drop has abated.

The inability of Congress to compromise on energy legislation and reports the House-Senate conference will push on into 1978 cast doubt on any significant cut in the U.S. oil import bill next year, which is the major reason for both the trade deficit and the dollar's weakness.

And the situation could significantly worsen, depending on the outcome of this month's meeting of the Organization of Petroleum Exporting Countries in Caracas, Venezuela.

Since the world oil trade is now denominated exclusively in dollars, depreciation of the currency has been cited as a reason for a new OPEC price boost of as much as 10 per cent. The Carter administration has expressed hopes that not price increase will be put into effect. Saudi Arabia and Iran have indicated support for this position.

The guessing, however, is that compromise of 5 per cent will be arrived at. Any price increase without a cut in imports further boosts the U.S. outlay for oil, widens the deficits and weakens the dollar even more in what is truly a vicious cycle.

Alternatively, proposals to price oil according to a basket of currencies and exclusively in dollars could lead to large-scale sales of dollar holdings in currency markets and a further pronounced slide of the U.S. currency.

A. Gary Shilling, chief economist and senior vice president with White, Weld & Co. sees some risk of "a disenchantment with the U.S. like what occured in the late 1960s and early 1970s, and a disillusionment that will cause people to start dumping dollars."

"If there was a wholesale dumping of dollars, we could see a decline in the dollar of 5 to 10 per cent," added Shilling. "That could prove extremely difficult on international trade, and could be the kind of trigger mechanism that would give you international trade wars."

Shilling said that for some months now there has been an underlying fear on the part of many institutional investors of "a worldwide financial crisis." Their concern is due not only to the dollar situation, but because of the build-up in bank debt to less developed countries, the signs of growing trade protectionism, and risk of a worldwide disinflationary trend that could squeeze profits and imperil the western economies.

"That's the fear - that the whole thing accumulates, you get a trigger mechanism, and then away we go," he said.

But then he cautioned that he was "aware of no case where a big financial collapse took place where everyone was worrying about it." He said the risk of such a scenario "is relatively low."

At the same time, he noted that, among holders of dollars. "There is still a widespread conviction that the U.S. while it has problems as an economy, is way ahead of whoever is in second place." He said there is no good alternative currency to switch holdings into if an individual seels dollars.

Ironically, the relative strength of the U.S. economy, as measured by its real growth rate of around 5 per cent, is also contributing to the dollar's weakness since it means the U.S. is able to buy more imported goods, and, conversely, has a harder time selling exports to countries whose economies are more sluggish.

In theory, the decline of the dollar relative to other currencies should make American goods cheaper on world markets and increase our exports. Meanwhile, the higher cost of foreign goods should cut imports.

At the same time, purchases of dollars by foreign central banks in an effort to prevent their currencies from appreciating too rapidly - estimated at $18 billion since the beginning of this year - expands those nation's internal money supplies. Theoretically it should stimulate their own domestic economies and narrow the differential with the U.S.

However, the record of past currency devaluations has shown the theoretical trade adjustment process to be extremely slow and sometimes nonexistent, while the inflationary problem created by higher import costs has shown up quickly and rippled through a nation's economy.

So Wall Street grows increasingly worried that the dollar slide could continue and contribute to a resurgence of U.S. inflation while it destabilizers critical world financial arrangements.