The market threw us a curveball Tuesday, Jim Cramer told his Mad Money viewers. Today we learned from Chemical giant BASF that the global economy was slowing because of tariffs and trade, yet many of the go-to recession stocks plunged instead of rallied.

Cramer said stocks like PepsiCo (PEP) - Get Report and Procter & Gamble (PG) - Get Report have long been the stocks investors flock to when the economy is slowing. But today, they went in a different direction, choosing the fast-growing tech names over the slow-and-steady consumer packaged goods stocks.

Cybersecurity topped the list, with Fortinet (FTNT) - Get Report and Okta (OKTA) - Get Report rallying by the close. The payment processors were another high-growth area that was on the move.

Amazon (AMZN) - Get Report also remained a favorite ahead of the company's annual "Prime Day" event, set for July 15 and 16.

Investors were also buying other fast-growing sectors like the semiconductors, defense stocks, and medical technology names such as Edwards Lifesciences (EW) - Get Report .

Stocks don't exist in a vacuum, Cramer concluded, the money needs to flow somewhere. So when bad news hits, if the money isn't flowing into consumer goods, you can bet it's headed toward technology. 

Cramer and the AAP team are looking at everything from earnings and tariffs to the Federal Reserve. Find out what they're telling their investment club members and get in on the conversation with a free trial subscription to Action Alerts Plus.

Executive Decision: IBM

For his "Executive Decision" segment, Cramer spoke with Ginni Rometty, chairman, president and CEO of IBM (IBM) - Get Report , and Jim Whitehurst, former CEO of Red Hat, which was officially acquired by IBM today.

Rometty said IBM's $34 billion acquisition of Red Hat gives IBM the leading platform for hybrid cloud deployments. The deal allows Red Hat to grow in the 175 countries IBM operates in and it expands the market opportunities for IBM and its many services businesses.

When asked about their vastly different corporate cultures, Whitehurst explained that there are no plans to "merge" the two cultures, but rather to work in concert going forward. Each team will continue to do what they do best.

Finally, when asked about growing competition in the cloud space, Rometty noted that Red Hat's platform works across all clouds and ultimately, that's what IBM's clients are looking for, one solution that can be deployed to a number of different locations. 

Executive Decision: Wex

In his second "Executive Decision" segment, Cramer also sat down with Melissa Smith, CEO of Wex (WEX) - Get Report , the corporate payments processor with shares that are up 52% for the year.

Smith explained that companies like Expedia (EXPE) - Get Report , they can't afford to handle the tens of thousands of payments from customers to hotels and airlines, so Wex handles those payments on their behalf, providing both technology and payment processing.

Wex also has a fuel-related business that uses a mobile app to speed transactions and eliminate fraud for corporate fleet vehicles.

On the consumer side of their business, Wex handles virtual card payments for applications like flexible medical spending accounts, ensuring that purchases qualify for those special-use functions. 

On Real Money, Cramer keys in on the companies and CEOs he knows best. Get more of his insights with a free trial subscription to Real Money.

Off the Charts: Online Retail

In the "Off The Charts" segment, Cramer checked in with colleague Tim Collins over the charts of four companies challenging Amazon in online retail: Etsy (ETSY) - Get Report , Lululemon Athletica (LULU) - Get Report , Pinterest (PINS) - Get Report and Stitch Fix (SFIX) - Get Report .

Collins first looked at a daily chart of Etsy, which has been trading sideways for the past four months, a pattern he said that makes the stock a coiled spring. Collins liked the stochastics, which just saw a bullish crossover.

Next, Collins looked at Lululemon, noting the rising wedge pattern that has a ceiling at $190 a share that will likely be taken out soon. He was also a fan of Pinterest, which also just saw a bullish crossover in its stochastics.

Finally, Collins liked the flag pattern of Stitch Fix, suggesting the stock could be bought right here.

Lessons From My Pop 

In his "No-Huddle Offense" segment, Cramer offered up some of the wisdom shared by his father, "Pop" who would have been 97 years old today.

Cramer recalled how Pop was a middleman, selling paper products to retailers that were too small to deal with the paper mills directly. For years, Pop's business thrived until Walmart (WMT) - Get Report came to town and targeted these small, mom-and-pop stores. At the time, Walmart was unbeatable -- until the Internet came to town.

Shortly thereafter, the paper mills themselves came under fire, this time from subsidized Chinese paper products unfairly imported under the guise of free trade.

So for as much as things change, things also stay the same, Cramer concluded, as he wished Pop a happy 97th. 

Lightning Round

In the Lightning Round, Cramer was bullish on Brookfield Renewable Partners (BEP) - Get Report and Bank of America (BAC) - Get Report .

Cramer was bearish on Aurora Cannabis (ACB) - Get Report , Nio (NIO) - Get Report and Ford Motor (F) - Get Report .

Introducing TheStreet Courses: Financial titans Jim Cramer and Robert Powell are bringing their market savvy and investing strategies to you. Learn how to create tax-efficient income, avoid top mistakes, reduce risk and more. With our courses, you will have the tools and knowledge needed to achieve your financial goals. Learn more about TheStreet Courses on investing and personal finance here.

Search Jim Cramer's "Mad Money" trading recommendations using our exclusive "Mad Money" Stock Screener.

To watch replays of Cramer's video segments, visit the Mad Money page on CNBC.

To sign up for Jim Cramer's free Booyah! newsletter with all of his latest articles and videos please click here.

At the time of publication, Cramer's Action Alerts PLUS had a position in AMZN.