Sonic  (SONC)  , the fast-food chain on roller skates, has had a volatile ride since setting an all-time intraday high back in March 2015. The stock was in recovery mode with the market after setting a low on Feb. 11. The stock set its 2016 high in April after a positive reaction to earnings on March 29.

Sonic stock ended 2016 in bear market territory after negative reactions to earnings on June 23 and Oct. 24. Following the first negative report the stock confirmed a "death cross" on July 13. A "death cross" occurs when the 50-day simple moving average falls below the 200-day simple moving average and indicates that lower prices lie ahead.

This risk was emphasized with a negative reaction to earnings on Oct. 24. The price gap to the Oct. 25 low proved to be a buying opportunity but the stock stayed below its 200-day simple moving average.

Can earnings late Wednesday turn the stock around? Analysts expect the food retailer to earn 22 cents a share. Some say that Sonic is a sell going into earnings. The comfort food specialist is now offering a breakfast special based upon the old-fashioned grill cheese sandwich, which could be a game changer.

Let's see what the charts say.

The daily chart shows Sonic's July 13 "death cross." Since then strength has been below its 200-day simple moving average. The stock set its 2016 low in reaction to its last earnings report released on Oct. 24. The price gap resulting from this gap lower has been filled and the stock is below its 50-day and 200-day simple moving averages.

The weekly chart shows a red line through the price bars, which is the key weekly moving average (a five-week modified moving average). The green line is the 200-week simple moving average considered the "reversion to the mean."

The study in red along the bottom of the charts is weekly momentum (a 12x3x3 weekly slow stochastic), which scales between 00.00 and 100.00, where readings above 80.00 indicates overbought and readings below 20.00 indicates oversold.

A negative weekly chart shows the stock below its key weekly moving average with weekly momentum declining below 80.00 in a trend towards 20.00. A positive weekly chart shows the stock above its key weekly moving average with weekly momentum rising above 20.00 in a trend towards 80.00.

Here's the daily chart for Sonic.

Courtesy of MetaStock Xenith

Sonic closed Tuesday at $26.09, down 19.3% year to date, and in bear market territory 28.2% below its April 6 high of $36.34. The stock is in bull market territory 23.5% above its Oct. 25 low of $21.12.

The key feature of the daily chart is the "death cross" confirmed on July 13 when the closed at $28.37. With the 50-day simple moving average below the 200-day simple moving average the stock would likely trade lower and it did to a low of $21.12 set on Oct. 25.

As a sign of stability, the stock filled the gap to its Oct. 24 low of $26.05 by Nov. 14. The stock has been trading back and forth around its 50-day simple moving average since Nov. 15 and Jan. 3, now at $26.10. The stock remains below its 200-day simple moving average of $28.68.

Here's the weekly chart for Sonic.

Courtesy of MetaStock Xenith

The weekly chart for Sonic is negative with the stock below its key weekly moving average of $26.70. The stock is above its 200-week simple moving average at $24.59. The weekly momentum reading is projected to slip to 77.61 last week down from 79.26 on Dec. 30.

Investors looking to buy Sonic should do so on weakness to $25.63 and $19.11, which are key levels on technical charts until the end of 2017 and the end of $19.11 by the end of January. Investors looking to reduce holdings should consider selling strength to $29.92, which is a key level on technical charts until the end of March. A higher risky level is $38.64 until the end of June.

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