OPEN-SOURCE SCRIPT
Estrategia Trend Following: 52w/26w Breakout

This is a classic long-term Trend Following strategy, heavily inspired by the Donchian Channel system and the legendary "Turtle Trading" rules. It is designed to capture major market moves (bull runs) while filtering out short-term market noise and volatility.
This script is ideal for investors and swing traders who prefer a "hands-off" approach, looking to catch large trends rather than day-trading small fluctuations.
How it Works:
1. Entry Condition (The Breakout):
52-Week High: The strategy enters a Long position when the price breaks above the highest high of the last 252 trading days (approx. 1 year).
SuperTrend Filter: An additional filter using the SuperTrend indicator ensures that the breakout is supported by positive momentum, helping to reduce false signals during choppy lateral markets.
2. Exit Condition (The Trailing Stop):
26-Week Low: The strategy ignores short-term corrections. It only closes the position if the price closes below the lowest low of the last 126 trading days (approx. 6 months).
This wide stop allows the trade to "breathe" and stay open during significant pullbacks, ensuring you stay in the trend for as long as possible.
Features & Settings:
Customizable Lookback Periods: You can adjust the Entry (default 252 days) and Exit (default 126 days) periods in the settings menu.
Visual Aids:
Blue Line: Represents the 1-Year High (Entry Threshold).
Red Line: Represents the 6-Month Low (Dynamic Stop Loss).
Channel Shading: Visualizes the trading range between the high and low.
Labels: Clearly marks "BUY" and "EXIT" points on the chart.
Recommended Usage:
Timeframe: Daily (1D). This logic is designed for daily candles.
Assets: Works best on assets with strong trending characteristics (e.g., Bitcoin/Crypto, Tech Stocks, Indices like SPX/NDX, and Commodities).
Patience Required: This strategy generates very few signals. It may stay quiet for months and then hold a position for over a year.
This script is ideal for investors and swing traders who prefer a "hands-off" approach, looking to catch large trends rather than day-trading small fluctuations.
How it Works:
1. Entry Condition (The Breakout):
52-Week High: The strategy enters a Long position when the price breaks above the highest high of the last 252 trading days (approx. 1 year).
SuperTrend Filter: An additional filter using the SuperTrend indicator ensures that the breakout is supported by positive momentum, helping to reduce false signals during choppy lateral markets.
2. Exit Condition (The Trailing Stop):
26-Week Low: The strategy ignores short-term corrections. It only closes the position if the price closes below the lowest low of the last 126 trading days (approx. 6 months).
This wide stop allows the trade to "breathe" and stay open during significant pullbacks, ensuring you stay in the trend for as long as possible.
Features & Settings:
Customizable Lookback Periods: You can adjust the Entry (default 252 days) and Exit (default 126 days) periods in the settings menu.
Visual Aids:
Blue Line: Represents the 1-Year High (Entry Threshold).
Red Line: Represents the 6-Month Low (Dynamic Stop Loss).
Channel Shading: Visualizes the trading range between the high and low.
Labels: Clearly marks "BUY" and "EXIT" points on the chart.
Recommended Usage:
Timeframe: Daily (1D). This logic is designed for daily candles.
Assets: Works best on assets with strong trending characteristics (e.g., Bitcoin/Crypto, Tech Stocks, Indices like SPX/NDX, and Commodities).
Patience Required: This strategy generates very few signals. It may stay quiet for months and then hold a position for over a year.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。