Investors must remember when President Donald Trump does something to make the stock market go down, in short time he'll say something to help stocks go back up, CNBC's Jim Cramer said Monday.

Wall Street is the "equivalent of his Nielsen ratings," the "Mad Money" host said, which is why it's a mistake to dump an entire portfolio on a tweet-induced sell-off by Trump, such as in last Friday's 623-point drop on the Dow Jones Industrial Average.

In Monday's session, the 30-stock index rebounded by nearly 270 points. The S&P 500 and Nasdaq Composite joined the Dow in expanding more than 1% during the trading day. The market moves follow a signal from Trump at the G-7 summit that American and Chinese officials could return to the negotiating table after another week of trade war escalation.

"Whether or not China wants to make a deal, from what I can tell, President Trump believes the longer he holds out, the better," Cramer said. "Which means we haven't seen the last of these brutal sell-offs, so get used to them, and next time remember there's almost always a bounce after the worst of the carnage because he wants one."

With the market running in a positive direction, Cramer advised that it's an opportune time to sell some stocks and protect some gains. However, investors must "filter out the emotional day-to-day noise" to understand the situation at hand with a clear-eyed view, he said.

Investors should swap their holdings from industrials, in particular, to companies that are less cyclical, Cramer said. American manufacturers are feeling a large amount of pain from the tariffs in place on Chinese imports.

In August, the U.S. manufacturing purchasing managers' index slipped under the neutral 50.0 threshold for the first time in nearly a decade, CNBC reported.

"There's a visible slowdown in manufacturing as measured by railcar loadings, lumber and plastic pricing, auto sales ... [and] high-end home purchases," he said.

Cramer suggested buying stocks, like Verizon, that have both good balance sheets and high dividends. Those with money in index funds need to just ride out the volatile market.

"This is going to be a long slog. You need to be prepared for more pain, and you need to be able to buy that pain," he said.

Still, the host isn't convinced that the U.S. is likely to strike a trade agreement with China if the country doesn't end its unfair trade practices, Cramer said. The public needs to realize that Trump is willing to let Wall Street take a tumble or two, as he's done in recent memory, in order to use tariffs to pressure Chinese negotiators to make a deal on his terms, he continued.

With the trade war going on for more than a year, Trump last week in a tweet demanded that American companies move their factories out of China, which caused stocks to tank.

"I think you need to view these on-again off-again negotiations as a way of giving U.S. companies more time to pull up stakes and leave," he said. "You've gotta understand Trump believes his tariffs can cause a serious recession in China, which would give him the upper hand and let him win real concessions and he doesn't care about the cost to us and the rest of the world."