1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.
Source Code
79 lines of Pine Script v6 from scripts/turtle-trading-rules.pine.txt, published under MPL-2.0. Keep the author's credit and licence lines when you reuse it.
Turtle Breakout (Dennis & Eckhardt) [JR] enters positions when price breaks above or below highest high or lowest low channel levels. Position size is dynamically calculated using ATR volatility so that one ATR move equals a specified percentage of equity. The strategy pyramids up to four units as price advances and sets ATR-based stops alongside opposite Donchian channel breakout exits. Configurable inputs adjust entry and exit lengths, risk percentage, ATR period, maximum units, and direction mode.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Entry: breakout of the last N days
int
55
entryLen
Exit: opposite breakout of the last N days
int
20
exitLen
System 1 filter: skip the next breakout after a winner
bool
false
skipWin
Direction
string
Long only
dirMode
N = ATR length
int
20
nLen
Stop: last unit ± N ×
float
1.5
stopN
Unit size: 1 N move = % of equity
float
1.0
riskPct
Max units
int
4
maxUnits
Add a unit every N ×
float
0.5
addN
Cap: one unit ≤ equity × (leverage)
float
2.0
maxLev
Trade from
time
timestamp("2000-01-01T00:00:00")
fromT
Trade until
time
timestamp("2100-01-01T00:00:00")
toT
Show all 13 settings
Setting
Type
Default
Variable
Show channels
bool
true
showLv
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This strategy plots VWMA-based Bollinger bands on the 1-minute ES futures price chart for volatility analysis and potential breakout identification. It calculates dynamic long and short stop loss and take profit levels using percentage inputs relative to entry
This strategy runs on the price chart and enters long when a fast simple moving average crosses above a slow one, and short on the opposite cross, while closing the other side. Entries also need ATR above a filter, a pullback check, a minimum candle-body chang
This strategy trades long breakouts of a fast and a slow moving average on the price chart. It opens a long position when price crosses above either average, using a percentage of equity as size. It reduces the position by a set share when the high reaches the
This trend-following strategy adapts classic Donchian breakout channels according to market volatility regimes. It calculates an ATR percentile rank across a rolling lookback period, shifting dynamically between tighter breakout channels with smaller stops dur
This strategy executes breakout trades using two Donchian Channels alongside an optional 200-period EMA trend filter. Entries trigger when the price sets a new highest high or lowest low over the primary Donchian Channel period. Exits are managed via a shorter
This strategy implements a channel breakout system directly on the main price chart. It calculates highest highs and lowest lows over configurable entry and exit periods using historical candles. A long entry triggers when the close breaks above the entry chan