Apple has long been a market darling, but it's gotten sliced and diced recently.

Shares of Apple were trading higher on Tuesday, but the stock has sunk 13 percent from its all-time high hit last month, shedding $145 billion in market cap since then. The stock is now on track for its longest weekly losing streak in six years, posting losses for five straight weeks and now pacing to post a sixth.

But this downturn, with the stock now trading near three-month lows, could very well be a chance to buy, according to a leading technical analyst.

"It's been a tough week for Apple, but we see this as an opportunity. Tough week, even over the last month, has retraced pretty much all of its gains following its last earnings report in July, when it had the positive response," Ari Wald, head of technical analysis at Oppenheimer, said Monday on CNBC's "Trading Nation."

Wald said he's watching the $196 per share level, which he said may become support after the stock gapped above that price following its July earnings report. That level is also just above the stock's rising 200-day moving average. It was trading above $204 on Tuesday morning.

"What makes this a compelling story, and why I think this pullback should be bought, is looking at the action versus the market. That July strength marked a six-year relative breakout for Apple versus the S&P 500. We're correcting back into that major support level. Aside from some near-term base-building, I think this is a terrific opportunity for long-term investors," he added.

Others are less sanguine on the stock at this juncture. The stock slid on its earnings report last week, deepening its after-hours decline after Apple said it would no longer report individual sales numbers for the iPhone, iPad and Mac.

The stock's valuation has come down to just over 15 times forward earnings, said Boris Schlossberg, managing director at BK Asset Management. By that measure, Apple is slightly cheaper than the broader S&P 500, which trades at nearly 16 times forward earnings. But he's still not a buyer.

"On the other hand, what you're seeing basically is that Apple — which used to be a hardware company that made all this money on hardware by creating a very, very pleasant software environment — is trying to become a software company, and that transition is just not very comfortable for it," he said Monday on "Trading Nation."

Schlossberg is no bear on the stock, he said, but he thinks it will trade in a range for some time. He'd recommend selling puts against the stock, but wouldn't chase the stock at this point.