OPEN-SOURCE SCRIPT
ATH / 52W Mechanical Breakout Strategy

This is a fully mechanical breakout strategy based on All-Time Highs and 52-Week Highs.
The system is built around a simple principle:
strength tends to lead to more strength.
When price breaks a significant high, momentum participants and trend followers enter the market. With no prior resistance above the level, price often has room to expand.
How It Works
• Detects breakouts above All-Time Highs or 52-Week Highs
• Enters long when a new high is created
• Exits using either:
– ATR trailing stop (Chandelier style)
– EMA close-based exit
The ATR stop automatically adjusts to volatility, keeping the system objective and rule-based.
Key Features
• Fully mechanical — no discretion required
• Works across stocks, indices, commodities and crypto
• Not over-optimised
• Designed for trend environments
• Removes emotional decision-making
Important Notes
This is a trend-following strategy. It will experience losing trades during sideways or choppy conditions. Its edge comes from capturing larger directional moves over time.
Always forward test and manage risk appropriately.
If you want something slightly shorter and more minimal (TradingView sometimes prefers concise):
Minimal Version
Mechanical breakout strategy using All-Time Highs and 52-Week Highs.
The system enters when price makes a new high and exits using either:
• ATR trailing stop
• EMA close-based exit
Designed to be simple, objective and robust across markets.
Trend-following systems will underperform in choppy conditions but aim to capture larger directional moves.
Not financial advice.
The system is built around a simple principle:
strength tends to lead to more strength.
When price breaks a significant high, momentum participants and trend followers enter the market. With no prior resistance above the level, price often has room to expand.
How It Works
• Detects breakouts above All-Time Highs or 52-Week Highs
• Enters long when a new high is created
• Exits using either:
– ATR trailing stop (Chandelier style)
– EMA close-based exit
The ATR stop automatically adjusts to volatility, keeping the system objective and rule-based.
Key Features
• Fully mechanical — no discretion required
• Works across stocks, indices, commodities and crypto
• Not over-optimised
• Designed for trend environments
• Removes emotional decision-making
Important Notes
This is a trend-following strategy. It will experience losing trades during sideways or choppy conditions. Its edge comes from capturing larger directional moves over time.
Always forward test and manage risk appropriately.
If you want something slightly shorter and more minimal (TradingView sometimes prefers concise):
Minimal Version
Mechanical breakout strategy using All-Time Highs and 52-Week Highs.
The system enters when price makes a new high and exits using either:
• ATR trailing stop
• EMA close-based exit
Designed to be simple, objective and robust across markets.
Trend-following systems will underperform in choppy conditions but aim to capture larger directional moves.
Not financial advice.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。