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.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya secara bebas dan tanpa apa-apa had – ketahui lebih di sini.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya secara bebas dan tanpa apa-apa had – ketahui lebih di sini.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.