June 3, 2026

Automating the Turtle Trading Strategy

The legendary Turtle Trading experiment by Richard Dennis showed that a mechanical trading approach can lead to immense success, even for those who have zero trading experience. Let's automate the legendary Turtle Trading Strategy.

The Turtle Experiment

The Turtle Trading Experiment is one of the most interesting trading stories ever. The experiment was set out by legendary trader Richard Dennis, who believed that anyone could become a successful trader, as long as they followed the right trading rules. Richard Dennis got into a debate with his partner, William Eckhardt, who believed that successful trading comes from experience, personality, and an instinct for market movements. 

They decided to put this debate to the test, and Richard Dennis recruited a group of ordinary people, trained them in a mechanical trend-following system, gave them capital, and told them to follow the rules. The results were astonishing. 

Disclaimer: Templates are for educational purposes only!

👉 Get the Turtle Trading Strategy Automation Template → Turtle Trading Profectus Template

This template is designed to run on the Daily Timeframe, but will run on all timeframes.

The Turtle Strategy

The traders from the experiment were known as turtles, and the strategy was named the Turtle Trading Strategy. The idea was simple:

  • Find 20-day high breakouts
  • If the trade moves into profit, scale into another position
  • Align the stop losses of all trades to the same level 
  • Trail the stop losses along the lowest price of the past 5 candles
  • Repeat until 4 trades are open, and ride the trend until it stops 

It was a completely mechanical system with no room for discretion. The stop losses were based on the ATR indicator values at the moment of entry and would be aligned to the most recent entry’s stoploss. The trailing of the stop losses would begin when a certain threshold of total account profit was reached. 

Watch our full Youtube video on the Turtle Trading Strategy

All the rules were written out for the “Turtles”, and all they had to do was follow them. And they did so successfully. Over a period of 5 years, this group of experimental traders amassed profits totalling $175 million. 

This is also the perfect example of the power of mechanical trading strategies and the power of automation. An automated trading system follows the same rules over and over, without any error, just what Richard Dennis wanted from the Turtles in his experiment. You can do this as well, and with an automated strategy, you don’t even have to take the trades yourself anymore.

Turtle Trading Strategy MT5 Expert Advisor
Turtle Trading Strategy example

Automate the Turtle Strategy in Profectus

Automating the turtle strategy in Profectus is not very difficult but it can look a bit intimidating because we’re programming 4 entries and 4 stop loss adjustments. To make it easier we divide it in 4 sections. 

  1. The Turtle Entry. We first plot the highest price of the last 20 candles and store it in a variable. We then check through a Trade rule block if the price crosses this highest price, and take the first buy position. This trade receives group number 1, to track it in later stages. After the trade, we reset the highest price variable back to 0
  2. The ATR Stop loss calculations. In the Turtle strategy, for every additional trade, we adjust the stop loss of the already open trades to the same stop loss level as the newest trade.
    We build this simply by checking if a trade is open, and assigning the most recent ATR value to the Stoploss variable. 
  3. Stacking positions. In this section we add 3 additional trading positions when price moves in our favour. Every 0.5% profit gain, we add another position and at the same time we adjust the stoploss of the already opened trades to the stoploss of the most recent trade (as we calculated this in the previous section). We do this simply by selecting the open trade, checking the floating profit for that trade, and adding a new trade with another group number. The best practice is to user group numbers 1 to 4. 
  4. Trailing stop loss. In this final section we have a simple stop loss trailing module which activates when the last trade (trade number 4) also runs 0.5% in profit. At this point we check if current price is above the lowest price of the last 5 candles. If yes, we select all trades, by adding all group numbers, and trail the stoploss along the lowest price of the the last 5 candles. All trades follow the same stop loss now. 

And that is the strategy logic explained for the Turtle Trading Strategy. The unique part of this strategy is obviously in sections 3 and 4 where we stack the positions and trail the stop loss following the same levels.

In Profectus this whole strategy looks like this.

Turtle Trading Strategy in Profectus AI
Turtle Trading Strategy in Profectus AI Blocks

Deploying the Strategy as an MQ5 Bot on MetaTrader 5

Once automated, the Turtle Trading strategy can be deployed as:

  • An MQ5 trading bot

  • Running 24/5 on MetaTrader 5

  • Executing trades exactly as designed once you add buy/sell blocks and rules

Why MT5?

  • Built-in algorithmic execution

  • Broker compatibility

  • Robust order handling

  • Industry-standard platform for automated trading

This allows you to move from manual chart analysis to mechanical automated trading.

Can You Automate Other Trading Legend strategies?

Yes. You can already find our legendary Rychard Wyckoff strategy here as well. We can automate any legendary strategy if it’s mechanical.

If a strategy has:

  • Clear rules

  • Defined conditions

  • Objective execution logic

It can be automated.

Get Access to the Turtle Trading Automation Template

Want to see how this Turtle Trading strategy works when fully automated?

Access an enhanced automation template used to turn this trading concept into a deployable MQ5 trading bot inside Profectus. This template has a trade execution module included, so you can start testing it right away!


Disclaimer: Templates are for educational purposes only!

👉 Get the Turtle Trading Strategy Automation Template → Turtle Trading Profectus Template

This template is designed to run on the Daily Timeframe, but will run on all timeframes.