OPEN-SOURCE SCRIPT
업데이트됨 Simple Trend & Breakout System v6

Key Features of the Strategy:
Multi-Timeframe (MTF) Trend Filter: The strategy uses a 240-period Exponential Moving Average (EMA) to determine the overall trend. Thanks to the MTF feature, the EMA is always anchored to the Daily (1D) chart by default, even if you switch your viewing chart to a Weekly timeframe. You can easily adjust the EMA length in steps of 5 within the settings.
Breakout Entry Logic: Instead of buying blindly, the script waits for bullish or bearish momentum (consecutive higher/lower closes). It then places a stop order 0.1% above the high (for longs) or below the low (for shorts) of the signal candle to catch the actual breakout.
Dynamic Percentage Trailing Stop: Exits are handled by a dynamic trailing stop set to 2.5% by default. It trails your position automatically, locking in profits and cutting losses, and is visualized directly on the chart (green line for longs, red line for shorts).
Realistic Backtesting Conditions: It includes a realistic trading commission of 0.01% per trade and allows you to set a custom Backtest Date Range (defaulting to 1998 - 2099).
Smart Data Handling (No Empty Drag): If you set the start year to 1922, but the asset data only begins in 1973, the script automatically detects the real start date. It calculates the CAGR accurately based only on the available data, preventing distorted, watered-down performance metrics.
Comprehensive StatTab: A dashboard in the bottom right corner gives you a direct comparison between your Strategy's performance and a pure Buy & Hold approach. It tracks Win Rate, Profit Factor, CAGR, Maximum Drawdowns, and the exact dates those drawdowns occurred.
Relative Equity Curve: An optional purple line that plots your strategy's equity growth directly onto the price chart. It anchors your starting capital to the asset's initial opening price, allowing you to visually see if your strategy is outperforming the underlying asset in real-time.
Multi-Timeframe (MTF) Trend Filter: The strategy uses a 240-period Exponential Moving Average (EMA) to determine the overall trend. Thanks to the MTF feature, the EMA is always anchored to the Daily (1D) chart by default, even if you switch your viewing chart to a Weekly timeframe. You can easily adjust the EMA length in steps of 5 within the settings.
Breakout Entry Logic: Instead of buying blindly, the script waits for bullish or bearish momentum (consecutive higher/lower closes). It then places a stop order 0.1% above the high (for longs) or below the low (for shorts) of the signal candle to catch the actual breakout.
Dynamic Percentage Trailing Stop: Exits are handled by a dynamic trailing stop set to 2.5% by default. It trails your position automatically, locking in profits and cutting losses, and is visualized directly on the chart (green line for longs, red line for shorts).
Realistic Backtesting Conditions: It includes a realistic trading commission of 0.01% per trade and allows you to set a custom Backtest Date Range (defaulting to 1998 - 2099).
Smart Data Handling (No Empty Drag): If you set the start year to 1922, but the asset data only begins in 1973, the script automatically detects the real start date. It calculates the CAGR accurately based only on the available data, preventing distorted, watered-down performance metrics.
Comprehensive StatTab: A dashboard in the bottom right corner gives you a direct comparison between your Strategy's performance and a pure Buy & Hold approach. It tracks Win Rate, Profit Factor, CAGR, Maximum Drawdowns, and the exact dates those drawdowns occurred.
Relative Equity Curve: An optional purple line that plots your strategy's equity growth directly onto the price chart. It anchors your starting capital to the asset's initial opening price, allowing you to visually see if your strategy is outperforming the underlying asset in real-time.
릴리즈 노트
v12 Update:// - Removed the continuous "Active Entry Line" that cluttered the chart during a trade.
// - Now strictly shows ONLY the pending trigger levels before entry and a 1-bar historical marker.
// v11 Update:
// - Overhauled "Pending Entry" visualization (live dashed line + historical 1-bar dash).
// v10/9/8/7 Updates:
// - Pro Dashboard, Time in Market, Calmar/Sortino Ratios, Trail plotting, Stop Year Bugfix.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.