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)
Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.