MQL4 - automated forex trading   /  

Code Base

Read Financial Magazines in MetaTrader 4 and MetaTrader 5!

Code Base  Indicators  The classic Turtle Trading Indicator To post a new code, please log in or register

Download MetaTrader 5 and visit MQL5.community Code Base
and Trade on the Go!
and Trade on the Go!
Couldn't find the right code? Order it in the Jobs section

This library is for
MetaTrader 4
Download MT 4 - 455 Kb

and Trade on the Go!

and Trade on the Go!

Name:
The classic Turtle Trading Indicator
Author: flaab (2012.05.24 10:15)
Rating: 10
Downloaded: 35080
Download:
 TheClassicTurtleTrader.mq4 (9.1 Kb) View

Description:

This trend following system was designed by Dennis Gartman and Bill Eckhart, and relies on breakouts of historical highs and lows to take and close trades: it is the complete opposite to the "buy low and sell high" approach. This trend following system was taught to a group of average and normal individuals, and almost everyone turned into a profitable trader.

The main rule is "Trade an N-day breakout and take profits when an M-day high or low is breached (N must me above M)". Examples:

  • Buy a 10-day breakout and close the trade when price action reaches a 5-day low.
  • Go short a 20-day breakout and close the trade when price action reaches a 10-day high.

In this indicator, entry and exit signals are displayed as arrows and dots. Original system is:

  • Go long on blue arrows
  • Go short short on red arrows
  • Exit long positions when a blue dot appears
  • Exit short positions when a red dot appears

This indicator should be used together with my other indicator: The Turtle Trading Channel, to represent the same period or the failsafe trading system. The important function about this indicator is that it actually checks if your last trade has been stopped out and gives further entry signals along the trend. So it is the perfect addition to the trading channel for a complete Turtle Trading approach.

I have, however, altered a little bit the algorithm to get early entry signals and avoid random trend swings in highly volatile conditions. To do so, this indicator will only show a trend change when a bar actually closes above or below the current trendline -instead of just touching it like a normal stop-loss order would do-. The downside is that you can only detect trend changes when the last bar has already closed. Just in case, the strict version is also available.

Both indicators implement trading alerts, enable or disable them at will depending on your trading setup.

Images:


This is what your trading setup shoud look like using the channel and the classic indicator.


Aditionally, this indicator also implements entry/exit alerts.


Parameters:

  • TradePeriod: Donchian channel period for trading signals
  • StopPeriod: Donchian channel period for exit signals
  • StrictEntry: Apply strict entry parameters like the Turtles did
  • StrictExit: Apply strict exit parameters like the Turtles did
  • StrictStop: Apply strict stop-loss like the turtled did
  • Greedy: Do not exit a trade unless it is in profit or the SL is hit
  • EvaluateStoploss: Check if we have been stopped out and show future signals
  • ATRPeriod: ATRPeriod to set the stop-loss
  • ATRStopNumber: N.Factor to calculate the stop-loss
  • DisplayAlerts: You know...


Recommendations:

  • Please, refer to The Turtle Trading Channel indicator to read the full and original trading rules
  • It can be used to get entry signals of the S1 system or indicate the S2 (failsafe) system


Changelog:

  • 2012-06-12: Updated the indicator adding several strict options for entries, exits, stops and so on.


Is the Turtle Trading System profitable?

The performance of the Turtle Trading system has been always doubted. The following is an EURUSD (1995-2012) backtest trading all signals of this indicator -without filtering out any trade-, trading only after the current bar has closed, decreasing the exposure according to the original turtle rules, adding to positions and trailing the stop-loss using ATR*2.



And finally, the same system with a 5% initial risk for each trade (maybe too much, but fun to watch)


14 comments: 1 2   To post a new comment, please log in or register

The free metatrader5 version has also been released. Please download from:

www.mql5.com/en/market/product/1804

16.10.2013 13:33 flaab
MadCow:
Just out of curiosity, why did you backtest using control points? Have you tried Every Tick?
When trading daily charts the difference is minuscule. But yes. Mostly same results.

01.08.2013 08:05 flaab
Just out of curiosity, why did you backtest using control points? Have you tried Every Tick?
23.06.2013 01:45 MadCow
schwarzerpeter:
Hi! do you know if it is somehow possible to use these indicators with forex tester 2 or any other backtesting software?

No, an indicator cannot be backtested by itself because you need a trading strategy -not just the entry points-.

But you can download a free turtle trading ea from my site.

Cheers.


26.04.2013 00:10 flaab
Cool indicator! Thank you!
03.02.2013 22:27 winden
Hi! do you know if it is somehow possible to use these indicators with forex tester 2 or any other backtesting software?
29.01.2013 11:39 schwarzerpeter

Thank you.  Good work !


16.01.2013 11:28 MathQuant

Thanks for this, much appreciated! 

26.06.2012 04:02 Beakon
HJ_ROCKS:

Hi Flaab,

Check last two hour chart for EurUSD, Gold, Silver Futurs " now alerts came after 1 hour completed after spain got downgraded !!!" just look at the charts what kind of damaged it can make after 20 bar low " if you get alerts on time as and when it breaks 20 bar low how much profitable it would be " i think you will get my message, why i am trying to send this message is that its upto trader take decision trade after 20 bar high or low break out !!!!!

Regards,

HJ_Rocks

Yep, alerts are only triggered after the bar has closed! I'll have to fix that in the near future in the strict version. In the meantime, use the strict version with CalculateBarClose == false and stay tuned :-P

29.05.2012 20:46 flaab

Hi Flaab,

Check last two hour chart for EurUSD, Gold, Silver Futurs " now alerts came after 1 hour completed after spain got downgraded !!!" just look at the charts what kind of damaged it can make after 20 bar low " if you get alerts on time as and when it breaks 20 bar low how much profitable it would be " i think you will get my message, why i am trying to send this message is that its upto trader take decision trade after 20 bar high or low break out !!!!!

Regards,

HJ_Rocks

29.05.2012 18:39 HJ_ROCKS