Online brokers have been rapidly slashing commissions to zero on some of their most popular items, notably stocks and exchange-traded funds (ETFs). The move caps off years of declining commissions across the industry.

While this trend has generally benefited investors — allowing them to keep more of their money — it’s really long-term investors who win big from this type of fee war. Here’s why these types of investors should cheer the changes, and why short-term investors may want to be somewhat cautious.

Brokers zero out commissions

Charles Schwab acted as the catalyst for this latest wave of price cuts across the industry. As one of the largest and most respected brokers, Schwab announced on Tuesday that they would be ending commissions for trades on stocks and ETFs, slashing fees from $4.95 to zero for these securities. On options trades, it also cut its base commission from $4.95 to zero, but traders will still pay $0.65 per contract.

TD Ameritrade followed suit later in the day, ending its $6.95 commissions for stock and ETF trades. It followed Schwab’s move on options, too, cutting its base commission to zero and lowering its per-contract fee on options trades to $0.65.

Rival E*Trade joined the fray the next day, slashing its $6.95 commission on stocks and ETFs to zero. It also trimmed its base commission on options trades to zero and slashed its per-contract fee on options trades to $0.65, matching its other big competitors.

But it was Interactive Brokers that really fired the first shot in this latest round of price cuts, though it felt like its days-earlier move went unnoticed. A leader in low-cost trading, Interactive Brokers introduced IBKR Lite, a service that allows unlimited free trades on stocks and ETFs. Another perk for investors: the account pays attractive interest rates on cash balances.

This has been the first round of major price cuts since 2017, after which the industry called an uneasy truce. But at least a couple other brokers already offered free trades.

Merrill Edge gifted clients up to 100 free stock and ETF trades per month as part of parent company Bank of America’s preferred client program, which required $20,000 to get started.

And of course, Robinhood has gone one better, and has always offered free stock and ETF trades, but recently added free options trades, too – not even a per-contract commission.

And just like that, most major online players have moved commissions on stocks and ETFs to zero, or at least given you the ability to access free trades.

[READ: 15 best investments of 2019]

How can brokers afford to do this?

So a reasonable question at this point is how exactly can brokers afford to do this and still make a profit. In actuality, given the competition, the question really is how can they afford not to do it. Commissions have ratcheted down in fits and starts for years, with one broker lowering them and then others following shortly thereafter. No one is willing to maintain higher prices and risk losing clients to rivals.

And that goes triple when the industry hit the magic number of zero.

But for some brokers commissions are not the largest part of their business, and while they’d prefer not to cut commissions, they have other ways to make up the revenue.

Take Schwab, for example. In 2018, trading revenue comprised just 8 percent of its overall revenue, having fallen from 15 percent in 2014. About 32 percent of its revenue came from asset management, while 57 percent was interest income on client funds that it holds.

So Schwab stands to lose less than 10 percent of its sales, and by lowering its price may be able to swipe clients from other smaller brokers where commissions are a huge part of their revenue. Plus, Schwab can benefit if it can get more customers into its low-cost fund business or continue to hold clients’ cash and generate interest for itself on the money.

The situation is different at TD Ameritrade, however, where commissions and transaction fees comprised about 36 percent of revenue in 2018. Meanwhile, net interest income was about 23 percent. So TD Ameritrade has a greater reliance on trading commissions, and the company has said it expects revenue to fall 15 to 16 percent due to the cuts.

And not all brokers have a robust asset management business like Schwab to take the sting off.

To offset this lost revenue, brokers have one immediately obvious path: sell their order flow. It’s a somewhat controversial practice in which a broker allows other traders to see what trades are placed on its platform, allowing faster traders to step in front of these trades and get a better price. In exchange, the broker gets cash.

The practice is common among no-commissions brokers such as Robinhood, and it allows high-frequency traders to cut pennies or fractions of pennies off each share traded, taking money from other traders. Are the new zero-commission brokers moving in this direction?

It’s highly likely.

Interactive Brokers has said that its new free service will sell order flow while its older platform will not. But Interactive’s move also appears to be part of a gambit to get the SEC to pay more attention to the industry and how it establishes a best price for trades. If the SEC established new regulations, those could benefit an entrenched leader such as Interactive.

Another key way that brokers might make up the shortfall is by paying you even less on cash balances in your account. Recall that Schwab generates 57 percent of its revenue from interest, and that’s the difference between what it earns on that money and what it pays clients. So the broker may seek to expand that margin by lowering what it pays out.

That, of course, is unfavorable to clients holding cash in their accounts.

Why long-term investors stand to benefit the most

While investors should be cheering the news, not all of them stand to benefit, depending on how the industry shapes up. But investors do have several moves they can make to ensure that the industry’s price-slashing does indeed benefit them.

First, it’s great that clients can avoid commissions on stocks and ETFs. That’s money that can go right back into their pocket. A trader might modestly do a trade a week, for example, so that’s around $250 that can be saved.

But will the lure of zero commissions actually cause investors to trade more often? If so, that could be quite dangerous for their wealth, since study after study shows that “time in the market” is one of the best predictors of an investor’s return and that day-traders typically lose money. While the savings may initially benefit short-term investors, it’s money that may ultimately be lost in the market as they continue to ring up losses.

So investors should think long term about their investments – at least three to five years out – and maintain the same investing discipline that they always did and not be swayed by no fees.

Second, investors can benefit by using free trades to practice dollar cost averaging more effectively. Dollar cost averaging means buying fixed dollar amounts of stock over periods of time. The practice averages out your buy price and can help you profit more.

Before, dollar-cost averaging could get expensive and cut into returns even if you were investing a few hundred dollars regularly. Now thanks to free trades, even investors with small amounts of money can add to their positions and take advantage of dollar-cost averaging.

Third, if as a response to this price cut, brokers move to pay even less on your cash balances, it could be wise for you to take matters into your own hands to ensure you’re maximizing your money.

For example, through your brokerage you can usually buy insured bank products such as CDs, which typically earn more than what a broker will pay on your idle cash. Or you can otherwise easily move that money out of the brokerage account and into a bank’s CD or high-yield savings account until it’s needed at the broker.

Alternatively, you can make investments – now for free – in other very low-risk products that earn a bank-like yield. (Here are five ways to use your brokerage account like a savings account.)

Finally, if free trades cause investors to trade more often, then it becomes even more important for investors to stick to their long-term mentality. Not only will they avoid the increased likelihood of losing money on short-term trades, but they’ll also minimize the effect of high-frequency traders on their portfolio. If you buy and hold long-term, the few pennies on a trade that these traders scalp on each share will make no real difference to your long-term return.

[READ: 8 best long-term investments]

Bottom line

The industry’s latest move to slash commissions can be great for investors, if they don’t let it affect their trading and instead plow the savings back into investments. But even as commissions fall, so do interest rates, and investors should make sure they’re managing any excess cash in their brokerage accounts and maximizing their returns.

Learn more: