Overview: This script provides traders with a dual-strategy system that they can toggle between using a simple dropdown menu in the input settings. It is designed to cater to different trading styles and needs, offering both simplicity and advanced filtering techniques. The strategies are built around moving average crossovers, enhanced by configurable risk management tools like take profit levels, trailing stops, and ATR-based stop-loss.
Key Features: Two Strategies in One Script:
Strategy 1: A classic moving average crossover strategy for identifying entry signals based on trend reversals. Includes user-defined take profit and trailing stop-loss options for profit locking.
Strategy 2: An advanced trend-following system that incorporates: A higher timeframe trend filter to confirm entry signals. ATR-based stop-loss for dynamic risk management. Configurable partial take profit to secure gains while letting the trade run.
Highly Customizable: All key parameters such as SMA lengths, take profit levels, ATR multiplier, and timeframe for the trend filter are adjustable via the input settings.
Dynamic Toggle: Traders can switch between Strategy 1 and Strategy 2 with a single dropdown, allowing them to adapt the strategy to market conditions. How It Works:
Strategy 1: Entry Logic: A long trade is triggered when the fast SMA crosses above the slow SMA. Exit Logic: The trade exits at either a user-defined take profit level (percentage or pips) or via an optional trailing stop that dynamically adjusts based on price movement.
Strategy 2: Entry Logic: Builds on the SMA crossover logic but adds a higher timeframe trend filter to align trades with the broader market direction.
Risk Management: ATR-Based Stop-Loss: Protects against adverse moves with a volatility-adjusted stop-loss. Partial Take Profit: Allows traders to secure a percentage of gains while keeping some exposure for extended trends.
How to Use: Select Your Strategy: Use the dropdown in the input settings to choose Strategy 1 or Strategy 2.
Configure Parameters: Adjust SMA lengths, take profit, and risk management settings to align with your trading style. For Strategy 2, specify the higher timeframe for trend filtering. Deploy and Monitor: Apply the script to your preferred asset and timeframe. Use the backtest results to fine-tune settings for optimal performance.
Why Choose This Script?: This script stands out due to its dual-strategy flexibility and enhanced features:
For beginners: Strategy 1 provides a simple yet effective trend-following system with minimal setup.
For advanced traders: Strategy 2 includes powerful tools like trend filters and ATR-based stop-loss, making it ideal for challenging market conditions.
By combining simplicity with advanced features, this script offers something for everyone while maintaining full transparency and user customization.
Default Settings: Strategy 1: Fast SMA: 21, Slow SMA: 49 Take Profit: 7% or 50 pips Trailing Stop: Optional (disabled by default) Strategy 2: Fast SMA: 20, Slow SMA: 50 ATR Multiplier: 1.5 Partial Take Profit: 50% Higher Timeframe: 1 Day (1D)
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.