It's no secret that a handful of big tech stocks have been leading the market higher in 2017. Case in point: Facebook Inc. (FB) and Alibaba Group Holding Ltd. (BABA) .

These two mega-cap tech stocks are up 39% and 70%, respectively this year, outperforming the rest of the broad market by a huge margin. But the best may still be yet to come for shareholders this summer. That's because Facebook and Alibaba both triggered breakout moves in Wednesday's trading session, opening the door to even more upside ahead.

It's worth noting that these breakout moves didn't come out of the blue. Facebook's buy signal has been on the radar all week long, for instance.

To figure out where they go from here, we're taking a technical look at both of these charts and how to trade them this summer.

Meanwhile, Jim Cramer and the AAP team dig into energy often. Get their insights or analysis with a free trial subscription to Action Alerts Plus.

Visit here for the latest business headlines.

Facebook has been forming a pretty textbook example of an ascending triangle pattern since mid-April, setting up for the breakout that finally happened Wednesday. The ascending triangle is formed by a horizontal resistance level up above shares at $155, with uptrending support to the downside. Basically, as Facebook ricocheted in between those two technically significant price levels, shares were getting squeezed closer and closer to a breakout through our $155 price level.

And that buy signal triggered with Wednesday's gap higher.

There's some extra confirmation of a Facebook rally coming from this chart. Relative strength, the indicator down at the bottom of Facebook's price chart, is signaling that shares are statistically likely to keep on outperforming the rest of the market this summer. That's because FB's relative strength line has been making higher lows of its own, an indication that the outperformance is continuing right now into the summer months.

Relative strength is arguably one of the most important indicators of a stock's future performance -- and Facebook's relative strength line is charging higher here.

If you decide to buy Facebook here, prior lows at $147.50 look like a logical place to park a protective stop.

Meanwhile, we're seeing a similar breakout happening in $390 billion Chinese e-commerce giant Alibaba.

Like Facebook, what's in play right now in Alibaba is an ascending triangle pattern. Unlike Facebook, Alibaba's price setup is much shorter term, only forming since the beginning of June. Now, shares are testing lifetime highs following Wednesday's breakout through prior resistance at $145.

For risk-management in Alibaba, it makes sense to park a protective stop on the other side of the 50-day moving average. That's because the 50-day has been a reasonably good proxy for BABA's uptrend since the start of 2017, and any price violation of the 50-day means that the trend has likely reversed and you don't want to own it anymore.

In the immediate-term, both Facebook and Alibaba look buyable here in spite of the considerable upside shares have already shown off this year. Expect these two tech giants to keep leading the market higher in July.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.

More from Stocks

Is the Cannabis Crazy Equivalent to the Dot Com Bubble? Watch!

Is the Cannabis Crazy Equivalent to the Dot Com Bubble? Watch!

Eventbrite Shares Surge in NYSE Debut

Eventbrite Shares Surge in NYSE Debut

AeroGrow International Is Ready to Sprout With the Cannabis Surge

AeroGrow International Is Ready to Sprout With the Cannabis Surge

Dow, S&P 500 Jump to Record Highs; Wall Street Looks Past Trade Fears

Dow, S&P 500 Jump to Record Highs; Wall Street Looks Past Trade Fears

GE Stock Won't Be a Buy Until It Acts Like George Costanza

GE Stock Won't Be a Buy Until It Acts Like George Costanza