PROTECTED SOURCE SCRIPT
Long & Short Trading Strategy

This strategy trades both long and short positions based on EMA (Exponential Moving Average) and ATR (Average True Range). The strategy uses 100% of equity per trade and displays visual entry and stop-loss lines on the chart.
Backtest Configuration
The strategy allows users to define a custom backtest period through input parameters for start and end dates (day, month, year). The default period runs from January 1, 2005, to December 31, 9999, with a time-based filter ensuring trades only execute within the specified range.
Core Strategy Parameters
Two key configurable parameters control the strategy: EMA/ATR Length ((CUSTOMIZATION ALLOWED)) and ATR Multiplier ((CUSTOMIZATION ALLOWED)). These determine the calculation of the bull and bear trigger levels around the moving average.
Stop Loss Management
The strategy implements a fixed stop loss system measured in points (CUSTOMIZATION ALLOWED). This applies to both long and short positions, with separate exit commands for each position type to manage risk.
Visual Line Customization
Users can customize the appearance of entry and stop-loss lines, including their length in candles (default 15), line width (1-4), and colors. Entry lines default to blue, while stop-loss lines default to red.
Backtest Configuration
The strategy allows users to define a custom backtest period through input parameters for start and end dates (day, month, year). The default period runs from January 1, 2005, to December 31, 9999, with a time-based filter ensuring trades only execute within the specified range.
Core Strategy Parameters
Two key configurable parameters control the strategy: EMA/ATR Length ((CUSTOMIZATION ALLOWED)) and ATR Multiplier ((CUSTOMIZATION ALLOWED)). These determine the calculation of the bull and bear trigger levels around the moving average.
Stop Loss Management
The strategy implements a fixed stop loss system measured in points (CUSTOMIZATION ALLOWED). This applies to both long and short positions, with separate exit commands for each position type to manage risk.
Visual Line Customization
Users can customize the appearance of entry and stop-loss lines, including their length in candles (default 15), line width (1-4), and colors. Entry lines default to blue, while stop-loss lines default to red.
Script protégé
Ce script est publié en source fermée. Cependant, vous pouvez l'utiliser librement et sans aucune restriction – pour en savoir plus, cliquez ici.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script protégé
Ce script est publié en source fermée. Cependant, vous pouvez l'utiliser librement et sans aucune restriction – pour en savoir plus, cliquez ici.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.