OPEN-SOURCE SCRIPT
تم تحديثه ATR SL 10/10

This indicator draws an ATR-based trailing stop on the main chart and shows two compact labels:
• Stop line = Low − (ATR × Multiplier).
• “Today” label: the current bar’s stop price.
• “5-bar Max” label: the highest stop value over the last N bars (rolling window). Labels auto-separate slightly if they overlap so both remain readable.
ATR selection logic
• On confirmed bars (after close): uses today’s ATR.
• In real-time (bar not confirmed): uses max(today’s ATR, yesterday’s ATR) to avoid under-estimating volatility early in the session.
Inputs
• Length: ATR period.
• Smoothing: RMA/SMA/EMA/WMA for ATR.
• Multiplier: stop distance in ATR units.
• Long Base: price source for the long stop (usually Low).
• Show Price Line: toggle the pink stop line.
• Lookback: window for the rolling 5-bar maximum label.
Notes
• Overlay = true; the line scales with the price chart.
• Prices/labels use mintick formatting for clean alignment.
• Works on any timeframe; ATR is computed from the active chart’s bars with the above real-time safeguard.
• Stop line = Low − (ATR × Multiplier).
• “Today” label: the current bar’s stop price.
• “5-bar Max” label: the highest stop value over the last N bars (rolling window). Labels auto-separate slightly if they overlap so both remain readable.
ATR selection logic
• On confirmed bars (after close): uses today’s ATR.
• In real-time (bar not confirmed): uses max(today’s ATR, yesterday’s ATR) to avoid under-estimating volatility early in the session.
Inputs
• Length: ATR period.
• Smoothing: RMA/SMA/EMA/WMA for ATR.
• Multiplier: stop distance in ATR units.
• Long Base: price source for the long stop (usually Low).
• Show Price Line: toggle the pink stop line.
• Lookback: window for the rolling 5-bar maximum label.
Notes
• Overlay = true; the line scales with the price chart.
• Prices/labels use mintick formatting for clean alignment.
• Works on any timeframe; ATR is computed from the active chart’s bars with the above real-time safeguard.
ملاحظات الأخبار
This indicator draws an ATR-based trailing stop on the main chart and shows two compact labels:
• Stop line = Low − (ATR × Multiplier).
• “Today” label: the current bar’s stop price.
• “5-bar Max” label: the highest stop value over the last N bars (rolling window). Labels auto-separate slightly if they overlap so both remain readable.
ATR selection logic
• On confirmed bars (after close): uses today’s ATR.
• In real-time (bar not confirmed): uses max(today’s ATR, yesterday’s ATR) to avoid under-estimating volatility early in the session.
Inputs
• Length: ATR period.
• Smoothing: RMA/SMA/EMA/WMA for ATR.
• Multiplier: stop distance in ATR units.
• Long Base: price source for the long stop (usually Low).
• Show Price Line: toggle the pink stop line.
• Lookback: window for the rolling 5-bar maximum label.
Notes
• Overlay = true; the line scales with the price chart.
• Prices/labels use mintick formatting for clean alignment.
• Works on any timeframe; ATR is computed from the active chart’s bars with the above real-time safeguard.
ملاحظات الأخبار
This indicator draws an ATR-based trailing stop on the main chart and shows two compact labels:• Stop line = Low − (ATR × Multiplier).
• “Today” label: the current bar’s stop price.
• “5-bar Max” label: the highest stop value over the last N bars (rolling window). Labels auto-separate slightly if they overlap so both remain readable.
ATR selection logic
• On confirmed bars (after close): uses today’s ATR.
• In real-time (bar not confirmed): uses max(today’s ATR, yesterday’s ATR) to avoid under-estimating volatility early in the session.
Inputs
• Length: ATR period.
• Smoothing: RMA/SMA/EMA/WMA for ATR.
• Multiplier: stop distance in ATR units.
• Long Base: price source for the long stop (usually Low).
• Show Price Line: toggle the pink stop line.
• Lookback: window for the rolling 5-bar maximum label.
Notes
• Overlay = true; the line scales with the price chart.
• Prices/labels use mintick formatting for clean alignment.
• Works on any timeframe; ATR is computed from the active chart’s bars with the above real-time safeguard.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.