After eight months of steady gains, stock-market volatility has again rocked investors.

When stock markets tremble, the advice from financial advisers is simple: Stick to your investment plan.

That's easier said than done. If your financial house is on fire, you want to fight the flames or flee. To stand back, watch and periodically throw more money on the bonfire is tough even for the most seasoned investor.

Here are some ways to sidestep the natural emotional triggers that can be costly during the next market correction or crash.

Beware of 'market crash PTSD.' The last bout of volatility was during February's correction, in which the major indexes tumbled by more than 10 percent, troubling a market that in 2017 had enjoyed a five-decade low for wild moves.

Sudden market turns have a way of stirring up memories of 2008's Great Recession. Market corrections and recessions are inevitable, but there's no reason to expect that a downturn of an equivalent magnitude is right around the corner.

Ignore your portfolio's peak. Humans are hard-wired to feel drops in portfolio value more than equivalent gains, a phenomenon known as "loss aversion." So when you see the value of assets below their peak, the urge is to stanch the loss by selling. But really, the smarter thing to do would be to hold — or even to purchase some more of these beaten-up stocks, a practice known as buying the dip.

"You need to look where you are at now vs. where you started — don't look at your peak," says Patricia Jennerjohn, a financial planner in Oakland, Calif. "Look how much your portfolio has grown since you started — keep that in perspective."

Tune out financial news and panicky ads. When global markets drop, wall-to-wall coverage by the financial media creates a sense of impending doom.

To protect your portfolio — and your sanity — advisers recommend not watching daily moves, but instead checking in monthly, quarterly or annually. Also, resist those strident market pitches online that proliferate in turbulent times.

Keep cash in the market. The return of volatility once again raises concern that the stock market finally will descend into bear territory, defined as a drop of at least 20 percent from the most recent high. Even though there have been five slumps in excess of 10 percent over the past nine years, U.S. stocks still are in the midst of the second-longest bull market in history. During periods of volatility, it can pay to keep calm and invest on.

Kevin Voigt is a writer at NerdWallet. E-mail: kevin@nerdwallet.com.