OPEN-SOURCE SCRIPT
ATR Trailing SL Fibonacci

ATR Trailing SL Fibonacci Indicator
This indicator combines ZigZag pattern detection with Fibonacci analysis to identify potential support and resistance levels for setting trailing stop losses.
Core Components:
ZigZag Pattern Detection
Uses imported ZigZag library to identify significant price swings
Configurable parameters:
depth: Minimum price movement threshold
deviation: Minimum deviation between swing points
backstep: Number of bars required for reversal confirmation
Fibonacci Analysis
Two display modes:
Retracements: Horizontal Fibonacci levels between ZigZag points
Timezone: Vertical Fibonacci time projections
Customizable Fibonacci levels with individual color settings
Customizable Fibonacci Levels:
Fib 0 (0%) - White
Fib A (23.6%) - Blue
Fib B (38.2%) - Green
Fib C (50%) - Gray (Default: ON)
Fib D (61.8%) - Orange
Fib E (78.6%) - Red
Fib F (100%) - White (Default: ON)
Display Features:
Visual Elements:
ZigZag line connecting swing points (toggleable)
Fibonacci level lines with colored labels
Price level labels at each Fibonacci line
Background color indicating trend direction
Customization Options:
Adjustable label sizes for Fibonacci levels and price labels
Timeframe selection for analysis
Source price selection (High/Low)
Technical Implementation:
Dynamic Updates: Automatically redraws Fibonacci levels when new ZigZag points are detected
Memory Management: Cleans up previous lines and labels to maintain chart cleanliness
Multi-timeframe Analysis: Uses request.security() for higher timeframe analysis
Trading Applications:
Stop Loss Placement: Use Fibonacci levels as dynamic trailing stop levels
Support/Resistance Identification: Key Fibonacci levels act as potential reversal zones
Trend Analysis: ZigZag direction helps identify overall market structure
Risk Management: ATR-based approach to setting stop losses relative to volatility
Usage Tips:
The 50% and 100% levels are enabled by default as they represent key psychological levels
Combine with other indicators for confirmation of Fibonacci level reactions
Use the background color as a quick visual reference for trend direction
Adjust the ZigZag parameters based on market volatility and timeframe
This indicator is particularly useful for traders who employ Fibonacci-based trading strategies and want a systematic approach to setting trailing stop losses based on market structure and key retracement levels.
This indicator combines ZigZag pattern detection with Fibonacci analysis to identify potential support and resistance levels for setting trailing stop losses.
Core Components:
ZigZag Pattern Detection
Uses imported ZigZag library to identify significant price swings
Configurable parameters:
depth: Minimum price movement threshold
deviation: Minimum deviation between swing points
backstep: Number of bars required for reversal confirmation
Fibonacci Analysis
Two display modes:
Retracements: Horizontal Fibonacci levels between ZigZag points
Timezone: Vertical Fibonacci time projections
Customizable Fibonacci levels with individual color settings
Customizable Fibonacci Levels:
Fib 0 (0%) - White
Fib A (23.6%) - Blue
Fib B (38.2%) - Green
Fib C (50%) - Gray (Default: ON)
Fib D (61.8%) - Orange
Fib E (78.6%) - Red
Fib F (100%) - White (Default: ON)
Display Features:
Visual Elements:
ZigZag line connecting swing points (toggleable)
Fibonacci level lines with colored labels
Price level labels at each Fibonacci line
Background color indicating trend direction
Customization Options:
Adjustable label sizes for Fibonacci levels and price labels
Timeframe selection for analysis
Source price selection (High/Low)
Technical Implementation:
Dynamic Updates: Automatically redraws Fibonacci levels when new ZigZag points are detected
Memory Management: Cleans up previous lines and labels to maintain chart cleanliness
Multi-timeframe Analysis: Uses request.security() for higher timeframe analysis
Trading Applications:
Stop Loss Placement: Use Fibonacci levels as dynamic trailing stop levels
Support/Resistance Identification: Key Fibonacci levels act as potential reversal zones
Trend Analysis: ZigZag direction helps identify overall market structure
Risk Management: ATR-based approach to setting stop losses relative to volatility
Usage Tips:
The 50% and 100% levels are enabled by default as they represent key psychological levels
Combine with other indicators for confirmation of Fibonacci level reactions
Use the background color as a quick visual reference for trend direction
Adjust the ZigZag parameters based on market volatility and timeframe
This indicator is particularly useful for traders who employ Fibonacci-based trading strategies and want a systematic approach to setting trailing stop losses based on market structure and key retracement levels.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.