Turtle Trading System – Codes for Metastock & AmiBroker

Generally, futures traders are familiar with the name of Richard Dennis. He was the founder of the Turtle Trading System. For many years the exact parameters of Dennis were kept a secret. Later he released some of them as the turtle strategy.

Dennis stepped into the stock market as a commodity futures trader. His trader-life is quite inspiring. He started with $5000 and became more than $100 million gainers. The Turtle strategy generally applies to future trading. This article will cover What the turtle trading system is along with free Amibroker AFL codes.

The real-life story of him is really an inspiring one. His principle is anyone could be taught to trade the futures markets. The turtle trading strategy mainly works on future trading.

Turtle Trading System FAQ

Does Turtle Trading System still work?

This is an old system. Turtles traded 100% mechanical using the specific system. Here the number of losers is more than the winners. But it has been seen that the winners are much bigger in terms of profit than the losers. Hence, this system still works very well if a trader can stick to the system.

What is Turtle Trading System?

The Turtle strategy was developed by Richard Dennis. The turtle experiment was based on the principle “anyone could be taught to trade”. It is a complete mechanical system that has specific entry and exit rules. The rule of buy entry is to buy a 20-day breakout. Similarly the rule for sell is to sell a 20-day breakdown. After the introduction of the turtle experiment, Dennis was considered as the most successful traders of that time.

Who were the original turtle traders?

The Turtle System was first introduced by Richard Dennis, a commodity trader. He introduced the system in 1983. Dennis was accompanied by William Eckhardt.

How The Turtle Trading System Was Introduced?

Richard arranged a Turtle Program by placing an ad in The Wall Street Journal. Among thousands of candidates, only 14 traders would make it through the first program of Turtle Techniques. Though Dennis had not released the exact criteria of the particular strategy, still traders use it widely in trading the live markets.

The Trading Rules

The specific technique is based on buying a future contract on a 20-day high(breakout) and selling on a 20-day low. The fundamental techniques guide the implementation of a trend-following strategy. It implies the reason for buying future breaking out to the upside of trading ranges and sell short downside breakout. It indicates an entry signal buying new four-week highs.

Position Sizing

Position sizing includes a formula. Here the concept “N” represents the underlying volatility of a particular market. Simply N=20 days EMA (Exponential Moving Average) of the ATR (Average True Range). Therefore, N indicates the average price range that a particular market experiences in a single day. We can calculate the daily true range by maximum (H-L, H-PDC, PDC-L). Here PDC is the previous day close. Here we can always place the initial stop loss at 2N. (2xN) or 2% of the entire account equity.

Entering the position is the most significant point in trading. Turtle uses a simple entry strategy. Short term based on 20-day breakout and Long-term based 55-day breakout. The thumb rule is that if the first 20-day breakout stops out, don’t take the next 20-day breakout. Rather now wait for the long term entry, i.e, the 55-day breakout.

Turtles were able to find the following answers:

  • How much is the volatility of the market
  • What is the system orientation
  • How much is the risk
  • What is the state of the market?

The Result

In this strategy, the total winning amount is higher than losing because this system always adds to the position on the winning trades. Suppose you lose in 1 lot, gain on 5 lots, the average gaining opportunity become much higher.

Turtle Trading System on AmiBroker

turtle trading system

In the AmiBroker platform, traders can use this advanced trading strategy. Check the image above to know how the system looks like on the AmiBroker. Here I have provided a FREE download link of Turtle trading system below.

If you are going to use my Turtle Trading System AFL on AmiBroker, remember this is not for intraday traders. Make sure that use an end of day chart. Also as the number of losers can be more than the number of winners, you must believe the system. You need nerves of steel to trade like turtles. Take each and every signal irrespective of what has happened in the last signal. I will love to hear your observations and your backtest. So do not forget to comment on your experiences.

Turtle Trading System on Metastock

Here is the code for Metastock users. You can create the indicator using the following code.

H > Ref (HHV(H, 20), -1) OR L < Ref (LLV(L, 20), -1);

H = Today’s high; L = Today’s low
HHV (H, 20) = Highest value that the high price (H) has reached in the previous 20 days.
LLV (L, 20) = Lowest value that the low price (L) has reached in the previous 20 days.
Ref (HHV(H, 20), -1) = The highest high price in the last 20 days refers to last day.
Ref (LLV(L, 20), -1) = The lowest low price in the last 20 days refers to last day.

Turtle Trading System Metastock

Back Testing Of Turtle Trading System

Now, I am going to tell you about the backtesting of the Turtle Trading Strategy. I used a software called Analyst’s Turtle Farm for that. This software follows the Turtle Strategy and Indian traders can also use it. The backtesting was started from 05-06-2013 in Nifty Futures.

Backtesting of Turtle Trading System

The backtesting image shows that the system has generated decent returns in the Turtle Trading System.

Turtle Trading With Zerodha Kite

How to create a Turtle Trading System in Zerodha Kite?

  1. Login to Zerodha Kite and open your chart

    First login to your Zerodha Kite account and open the stock or index you want to trade. Here I opened the Nifty index chart.

  2. Attach the Donchian Channel indicator

    Next, I attached the Donchian Channel indicator. I kept the default value, 20-day high period and 20-day low period. So this channel will plot lines at 20-day high and 20-day low levels.

  3. The trading rules

    We can take a buy trade if the price candle closes above the 20-period Donchian channel peak. Exit the buy trade if the price closes below the middle band. Similarly, we can take a short sell trade if the price candle closes below the 20-period Donchian Channel trough. Exit the short trade if the price closes above the middle band. Check the image below to know more.Turtle Trading In Zerodha Kite

Further Reading

The best book on this subject is Way of the Turtle: The Secret Methods that Turned Ordinary People into Legendary Traders written by Curtis M. Faith.

Curtis was one of the original students of Richard Dennis. He was one of the Turtles of 1983 batch. So, this book is directly from the horse’s mouth. A must-read for them who want to know the mechanical system correctly.

Turtle Trading System – Codes for Metastock & AmiBroker

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top