OPEN-SOURCE SCRIPT
Long-Term Strategy: 1-Year Breakout + 6-Month Exit

Descripción (Description): (Copia y pega todo lo que está dentro del recuadro de abajo)
Description
This is a long-term trend-following strategy designed to capture major market moves while filtering out short-term noise. It is based on the classic principle of "buying strength" (Breakouts) and allowing profits to run, while cutting losses when the medium-term trend reverses.
How it Works (Logic)
1. Entry Condition (Long Only): The strategy looks for a significant display of strength. It enters a Long position only when two conditions are met simultaneously:
Price Breakout: The closing price exceeds the highest high of the last 252 trading days (approximately 1 year). This ensures we are entering during a strong momentum phase.
Trend Filter: The SuperTrend indicator (Settings: ATR 10, Factor 3.0) must be bullish. This acts as a confirmation filter to avoid false breakouts in choppy markets.
2. Exit Condition: The strategy uses a trailing stop based on price action, not a fixed percentage.
It closes the position when the price closes below the lowest low of the last 126 trading days (approximately 6 months).
This wide exit allows the trade to "breathe" during normal market corrections without exiting the position prematurely.
Settings & Risk Management
Capital Usage: The script is configured to use 10% of equity per trade to reflect realistic risk management (compounding).
Commissions: Included at 0.1% to simulate real trading costs.
Slippage: Included (3 ticks) to account for market execution variability.
Best Use: This strategy is intended for higher timeframes (Daily or Weekly) on trending assets like Indices, Crypto, or Commodities.
Description
This is a long-term trend-following strategy designed to capture major market moves while filtering out short-term noise. It is based on the classic principle of "buying strength" (Breakouts) and allowing profits to run, while cutting losses when the medium-term trend reverses.
How it Works (Logic)
1. Entry Condition (Long Only): The strategy looks for a significant display of strength. It enters a Long position only when two conditions are met simultaneously:
Price Breakout: The closing price exceeds the highest high of the last 252 trading days (approximately 1 year). This ensures we are entering during a strong momentum phase.
Trend Filter: The SuperTrend indicator (Settings: ATR 10, Factor 3.0) must be bullish. This acts as a confirmation filter to avoid false breakouts in choppy markets.
2. Exit Condition: The strategy uses a trailing stop based on price action, not a fixed percentage.
It closes the position when the price closes below the lowest low of the last 126 trading days (approximately 6 months).
This wide exit allows the trade to "breathe" during normal market corrections without exiting the position prematurely.
Settings & Risk Management
Capital Usage: The script is configured to use 10% of equity per trade to reflect realistic risk management (compounding).
Commissions: Included at 0.1% to simulate real trading costs.
Slippage: Included (3 ticks) to account for market execution variability.
Best Use: This strategy is intended for higher timeframes (Daily or Weekly) on trending assets like Indices, Crypto, or Commodities.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.