This indicator helps traders to dynamically track their trailing stops based on market volatility, ensuring better risk management and optimized exit points.
This Pine Script indicator for TradingView calculates and plots trailing stops based on the 21-period Exponential Moving Average (EMA) and the Average True Range (ATR). The script uses an ATR multiplier to adjust the trailing stops dynamically.
Key Features:
Trailing Stops Calculation:
Long Trailing Stop: Calculated as EMA21 - (ATR * ATR Multiplier)
Short Trailing Stop: Calculated as EMA21 + (ATR * ATR Multiplier)
Customization Options:
Visibility: Toggle the visibility of long and short trailing stops.
Color: Customize the color of the trailing stops for both long and short positions.
Line Width: Adjust the width of the trailing stop lines.
Inputs:
EMA Length: Set the length for the Exponential Moving Average (default is 21).
ATR Length: Set the length for the Average True Range (default is 14).
ATR Multiplier: Set the multiplier for the ATR to adjust the trailing stop distance (default is 1.0).
قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعدقوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.
هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.