Since the Shanghai Composite Index dropped from a 52-week high around 5,178 on June 12, it’s been downhill all the way.

In just three weeks, stocks listed on mainland China’s most prominent exchange tumbled 30% from seven-year highs. The even more speculative ChiNext Index has lost 42% of its value over 21 days.

Investors and traders who piled into Chinese shares over the past year, causing Shanghai to rise 150% and other markets to catapult even more dramatically, faced margin calls on their highly leveraged positions and started selling with both hands and both feet.

It was the biggest rout in this volatile market since 1992, and it prompted the Chinese government to take strong measures.

Last week, the Bank of China cut short-term interest rates for the fourth time this year. Regulators relaxed margin requirements and cracked down on short sellers, while state-run media tried to calm jittery investors with happy talk. That did little to stanch the hemorrhage.

Over this past weekend, government authorities and “private” Chinese brokerages and companies announced even more dramatic moves to prop up stocks:

• Brokerages and mutual-fund companies said they would buy billions of dollars’ worth of Shanghai shares.

• A state-owned investment firm said it would buy China-based ETFs.

• Twenty-eight companies said they would put planned initial public offerings on hold, as IPOs had been the focus of the most intense speculation.

• Regulators also increased the kinds of assets that can be used as collateral to buy stocks, to include — are you ready for this? — people’s homes. I’m not making this up.

The goal: Show retail investors that the all-powerful Chinese government had their backs and that the “Beijing Put” was alive and well.

Except it wasn’t. Shanghai opened up a strong 8.5% on Monday, despite Greece’s resounding “no” vote in Sunday’s referendum. But shares slipped throughout the trading day and closed up only 2.5%. On Tuesday, Shanghai slipped 1.3%, and on Wednesday plunged 5.9%.

That was a clear sign that the government had taken its best shot and failed. Which means that the most likely direction for Shanghai, Shenzhen and other mainland exchanges is down, down, down.

Morgan Stanley, which made a good “sell” call on China weeks ago, now expects Shanghai to fall as low as 3,250 by mid-2016. Citigroup analysts told clients the selloff has a “long way to go.”

I agree, but I think it could go much, much lower.

As I’ve written many times, China, Brazil, Russia and other emerging markets are suffering through secular bear markets that will last years. Since Chinese stocks represent more than 20% of some emerging-markets ETFs, the pain will likely continue well into this decade.

Is China’s market-rescue plan working?

Secular bear markets feature sudden, violent rallies and mini–bull markets that fool people into thinking they’re the genuine article. In real bull markets, indexes repeatedly top their previous highs; in bear markets, they never do.

So it was an ominous sign when Shanghai hit 5,000 and then reversed sharply. The previous all-time high was over 6,000 in October 2007. We thus have an eight-year down trend.

Back in 2007, China was booming as the government rolled out massive new infrastructure ahead of the 2008 Olympic Games, which by any measure were a huge success.

But after the financial crisis, the Great Recession and a domestic real-estate bust, China is struggling to hit the government’s 7% economic-growth target. When the property market crashed, desperate Chinese authorities encouraged novice investors to channel their speculative energies into the stock market.

Now that’s reversing quickly, as massive margin calls swamp the government’s efforts to stop the rout.

The underlying problem is that while the Chinese economy has made great strides and become a global powerhouse, China’s investing culture remains backward and immature.

As John Mauldin wrote in his “Thoughts From the Frontline” e-letter this week: “Chinese individual investors are not primarily ‘value’ investors. Sky-high valuations don’t seem to faze them. They are primarily momentum investors who buy whatever is moving and sell whatever is falling.

“According to my friends who go to casinos and watch the Chinese gamble, they tend to jump on a ‘trend’ such as red coming up on the roulette table repeatedly — never mind that the odds are only ever 50-50. Red is seen as hot and therefore the way to bet. That carries over into trading styles. …”

When highly unsophisticated investors run into trouble, they panic quickly and try to get out at any price. The same inexperienced bettors who drove Shanghai up to 5,000 will take it way down, maybe to the last bear-market low above 1,700 — or maybe even lower, to 1,500, before it finds a long-term bottom.

When Shanghai was peaking at 5,000 in June, I gave you five words of advice: Get. The. Hell. Out. Now.

To which I’ll add five more: And. Stay. The. Hell. Out.

Howard R. Gold is a MarketWatch columnist and founder and editor of GoldenEgg Investing, which offers free market commentary and simple, low-cost, low-risk retirement investing plans. Follow him on Twitter @howardrgold.