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.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.