Dow components Exxon Mobil Corporation (XOM) and Chevron Corporation (CVX) have underperformed throughout 2017 but could lift into market leadership in 2018, underpinned by a resilient crude oil market and strong U.S. economy, supercharged by tax cuts and deregulation. However, buying these stocks too early could be hazardous to your bottom line because end-of-year tax selling may inhibit buying power until the calendar flips in January.

The WTI crude oil contract has lifted to a two-year high and could soon test resistance in the lower $60s. Meanwhile, OPEC and Russia have just agreed to extend oil output curbs through the end of 2018, allowing U.S. energy companies to benefit from higher commodity prices as well as ramped-up production levels because our government has not agreed to similar cuts. Taken together, energy stocks at all capitalization levels could finally enter bull market advances. (See also: A Guide to Investing in Oil Markets.)

Exxon Mobil shares broke out above the 2008 high at $95.64 in December 2013 and hit an all-time high at $104.76 in July 2014. A steep downturn accelerated in the second quarter of 2015, finally coming to rest at a five-year low in the mid-$60s in August. The subsequent recovery posted two broad rally impulses, lifting the stock into the closely-aligned 786 Fibonacci sell-off retracement and failed breakout levels in July 2016.

A shallow but persistent correction off that resistance level finally ended in the mid-$70s in August, giving way to a bounce that mounted the 200-day exponential moving average (EMA) in October. The stock has been crisscrossing the moving average for the past two months, trying to build support, while price action since February 2017 has carved a potential inverse head and shoulders pattern. This potent combination predicts that a breakout above the neckline at $84 will generate a test at long-term resistance in the mid-$90s.

On-balance volume (OBV) bottomed out in August 2015 and lifted into a 52-week high in July 2016. A sideways chop into the second half of 2017 signaled a delicate balance between bulls and bears, ahead of a strong buying impulse that reached a two-year high in October. This renewed buying interest could mark a tradable low ahead of superior 2018 performance. Even so, it is likely that positions taken in the mid-$80s following an inverse head and shoulders breakout will require a relatively long-term holding period to build sizable profits. (For more, see: Exxon, Chevron and Oil Are Breaking Out.)

Chevron stock has carved a stronger price pattern than its Dow rival, but significant technical challenges remain. It broke out above the 2008 high at $104.63 in 2011 and entered a rising wedge pattern that persisted into the July 2014 all-time high at $135.10. The subsequent downturn broke wedge support in October and failed the multi-year breakout in June 2015, triggering a decline that continued into August, when it bottomed out at a five-year low near $70.

A healthy uptick through 2016 unfolded through three rally waves that stalled near $120 in December. Loyal shareholders suffered through a persistent decline in the first half of 2017, with strong support at $102 finally taking hold in July. The stock rallied back to the 2016 high in October and dropped into a narrow trading range that may now complete the handle in a cup and handle pattern.

A breakout should bring the 2014 high into play, with that level marking the final barrier ahead of a bull market advance that could add many points in the coming years. Meanwhile, OBV has just lifted above the December 2016 recovery high and reached a three-year high, predicting that price will play catch-up in coming months. Even so, the stock has gained less than two points to far in 2017, increasing the odds that tax selling pressure will inhibit buying power into early 2018. (See also: The Top 3 Chevron Shareholders.)

The Bottom Line

Big oil price action has improved greatly in the second half of 2017, lifting major players into price levels that could support healthy 2018 upside. Chevron looks like a better bet than Exxon Mobil in this bullish scenario, set to test this decade's bull market high after it mounts resistance at $119. (For additional reading, check out: Why Energy Stocks Are Suddenly Hot.)

<Disclosure: The author held no positions in the aforementioned securities at the time of publication.>