Despite the fact that the legendary Turtle Traders used an average true range based stop-loss, this useful indicator is not to be found in the long list of indicators that come built in to MetaTrader 4.

Even if you perform a Google search for such a thing it's pretty hard to come by a decent one for MetaTrader, so here we humbly present the source code for the Trading Gurus version of an ATR based trailing stop indicator:

As always, if you discover something that looks suspiciously like a creepy crawly thing lurking inside, please advise us of that fact by commenting on this thread.

Here's what a 2.5 ATR trailing stop looks like on a recent daily chart of USD/JPY: