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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.