The retail industry has been under siege the last few years, and 2017 is on pace to see the worst losses yet. At the midpoint of the year, brick-and-mortar stores were closing at the fastest pace ever.

A few retail chains are bucking the trend, though, and steadily opening new locations. What has been the key to their success?

Bargain-bin discounting.

The hunt for riches and glory

Off-price retailers like TJX Companies (NYSE:TJX) -- parent company of TJ Maxx, Marshall's, and Home Goods -- and Ross Stores (NASDAQ:ROST) have generally thrived in this challenging environment. In an industry that has become consistently plagued by declining foot traffic and store closures as shoppers migrate online, both chains have been reporting progress in the opposite direction:

Metric

TJX Companies

Ross Stores

Net new stores opened in last year

238

88

Year-to-date comparable-sales growth

2%

4%

Year-to-date revenue growth

5%

7%

Year-to-date earnings per share growth

4%

14%

Data source: TJX Companies and Ross Stores quarterly earnings.

It's not just about the deals, either. These companies are tapping into the inner Indiana Jones that resides in many shoppers -- the adventure and excitement in finding that special deal, tucked away in an aisle or a bin waiting to be found. Both companies source their product from vendors who have too much stock, thus creating the hidden treasure-style experience.

Not all retailers are able to copy that experience in their stores, but discounting is becoming an increasingly large part of the strategy to combat online stores. But a straight price war could also have its limits, too, as the recently reported quarter shows.

What's with the stock dip?

Both TJX and Ross forecast decelerating foot traffic and profits going forward. For the former, management said that comparable sales will increase 1% to 2% and full-year earnings, when adjusted for one-time charges and an extra week of business this year, will go up 7% to 8%. Full-year earnings were up 24% last year.

The outside of a TJ Maxx off-price retailer in a city center.

Image source: TJX Companies.

For Ross, comparable sales are expected in the 1% to 2% range as well, with full-year earnings increasing 9% to 11% when excluding the extra week of business in 2017. Full-year earnings increased 13% last year.

TJX, the bigger of the two companies with over 3,900 stores worldwide to Ross Stores' nearly 1,600, also showed selling and operating costs increasing faster than sales. Those factors put a damper on the stock, but it's too early to determine whether a long-term challenge is taking hold.

Food for thought

Over the last few years, the off-price retail concept has not only staved off the disruption of the internet but fueled ways for TJX and Ross to grow. There is still a lot to like about that approach, especially with the pain competitors are feeling. But with the retail world in flux and other merchandisers getting equally aggressive on pricing, that could restrict the amount of extra foot traffic that off-price players are able to poach.

And as increasingly cheaper prices mean lower profits, investors are beginning to see the limits to this discount-focused business model.

Nicholas Rossolillo has no position in any of the stocks mentioned. The Motley Fool recommends The TJX Companies. The Motley Fool has a disclosure policy.