How It Works: Parameters : ATR Period : The period for calculating ATR (default is 14). Stop Loss Multiplier : The ATR multiplier for calculating the stop-loss (default is 1.5). Take Profit Multiplier : The ATR multiplier for calculating the take-profit (default is 2.0). ATR Calculation : The built-in ta.atr() function is used to calculate the Average True Range. Stop-Loss Levels : For long positions: the current price minus the ATR value multiplied by the multiplier. For short positions: the current price plus the ATR value multiplied by the multiplier. Take-Profit Levels : For long positions: the current price plus the ATR value multiplied by the multiplier. For short positions: the current price minus the ATR value multiplied by the multiplier. Visualization : Green line — Stop-loss level for long positions. Red line — Stop-loss level for short positions. Teal line — Take-profit level for long positions. Orange line — Take-profit level for short positions. Text labels "Long SL", "Short SL", "Long TP", and "Short TP" are added for clarity.
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Salut untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.