Online trading using discount brokerage websites has made it a lot easier for people to buy stocks. But lately, stock investors feel like they've been tossed into a scene from Terminator 2 -- and it's not at all clear whether lowly human traders will be able to emerge victorious over the machines.

Fortunately, though, you have some strategies you can use to fight back. There are several fail-safe ways to make sure you don't fall prey to the automated shenanigans that have increasingly plagued the financial markets in recent years.

Trading at the speed of light
You don't have to be terribly old to remember the days when online trading wasn't available. In order to buy or sell a stock, you actually had to talk to a human broker, which made the full-service brokerage commission rates that industry leaders Morgan Stanley (NYSE: MS) or Goldman Sachs (NYSE: GS) charged seem much more reasonable in hindsight. Full-service brokers would, in turn, relay your trade to another actual person -- typically another brokerage employee -- on the trading floor, who would combine your order with those of many other brokerage clients to make trades with other traders at the stock exchange. You'd have to wait patiently as details of your final trade execution made their way back through the chain to your broker.

Now, buying stock is as simple as pushing a button. One way that brokers try to distinguish themselves is through superior stock execution; E*TRADE Financial (Nasdaq: ETFC), for instance, boasts a two-second trade execution guarantee for some market orders on stocks within the S&P 500, as well as exchange-traded funds. If it takes longer for E*TRADE to get your trade completed, they'll waive their commission fee on that transaction. TD AMERITRADE (Nasdaq: AMTD) has a similar provision for certain trades.

But technology has also introduced some scary practices. High-frequency trading, in which automated orders are placed at split-second intervals in an attempt to take advantage of momentary inefficiencies in the financial markets, has forced the traditional stock exchanges NYSE Euronext (NYSE: NYX) and Nasdaq OMX (Nasdaq: NDAQ) to adapt to competition from upstart trading platforms that cater to electronic trading. CME Group (NYSE: CME) has made a huge investment in technology that allows electronic traders to place their computers close to the CME's own computers, which manage futures and options markets for a variety of different financial products. The practices have been blamed for last year's Flash Crash and other past market disruptions.

Slow it down
Regulation of high-frequency trading may come in the future. But regardless of whether that happens, or what form future regulation takes, you should still prepare to defend yourself against those practices.

Here are three things you can do to minimize any negative impact from high-frequency trading:

  • Trade less. With commission costs on the decline, the temptation to trade more frequently has never been greater. But if high-frequency traders are eating up a small fraction of your money every time you buy or sell a stock, the obvious solution is to minimize the number of transactions you make. Long-term buy-and-hold strategies cause the least damage from market-based frictional costs.
  • Stick with liquid stocks and ETFs. During the Flash Crash, the vast majority of securities that were affected the most had relatively low average daily volume. Illiquid stocks and ETFs are especially vulnerable to automated strategies, because relatively small orders can move the markets violently. So when possible, choose investments with high trading volumes -- and when you do want shares of a lightly-traded stock or ETF, be sure to use limit orders to protect yourself from unexpected swings.
  • Don't trust price swings. It's entirely possible that artificial trading algorithms will create price movements that wouldn't have occurred otherwise. It's essential that you recognize those movements for what they are, rather than mistakenly assuming that they have some connection to the fundamentals of the stock's underlying business. You can't just trade by intuition anymore; only if you have a firm grasp of the intrinsic value of a company you invest in will you know when a stock's price movements are being manipulated by unusual trading activity.

Don't let the machines win
It's scary to go up against computers trading millions of shares per second. But if you stick to your guns, you can still invest well against the best computer algorithms. By focusing on the long-term prospects for great stocks, you'll find the only way to win against the machines: refusing to play the game by their rules.

Don't let machine-based trading ruin your retirement. Click here to read the Fool's new special report, "The 7 Secrets to Salvage Your Retirement Today."