Sunmool's Trend Reversal Detection Algorithm

📋 알고리즘 개요
Sunmool's Trend Reversal Detection Algorithm은 Fair Value Gap(FVG), Change in State of Direction(CISD), Break of Structure(BOS) 개념을 활용하여 추세 반전을 단계별로 감지하는 트레이딩뷰 인디케이터입니다.
조건이 단계별로 달성될수록 추세 반전의 신뢰도가 높아지며, 최대 20단계까지 추적하여 극도로 높은 신뢰도의 신호를 제공합니다.
🎯 핵심 개념
Fair Value Gap (FVG)
정의: 3개 캔들 사이에 생긴 가격 공백 (갭)
상승 FVG: 현재 캔들의 저점 > 2캔들 전 고점
하락 FVG: 현재 캔들의 고점 < 2캔들 전 저점
역할: 시장의 불균형을 나타내며, 향후 되돌림 지역으로 작용
Change in State of Direction (CISD)
정의: 추세의 방향성 변화
감지 방법: 단기 이동평균(5)과 장기 이동평균(10)의 교차
역할: 추세 전환의 초기 신호 확인
Break of Structure (BOS)
정의: 중요한 지지/저항 레벨의 돌파
조건: 종가와 고점/저점이 모두 기준 레벨을 넘어설 때
역할: 추세 전환의 확정적 신호
📊 단계별 조건 설명
🔵 1번 조건 - FVG 형성
조건: Fair Value Gap이 형성되었을 때
표시: 파란색 박스 + 파란색 원 마크
의미: 시장 불균형 발생, 추세 반전 가능성의 시작점
신뢰도: ⭐ (매우 낮음)
🟠 2번 조건 - FVG 터치 + CISD
조건: 1번 FVG를 가격이 터치한 후 → CISD 발생
표시: 주황색 삼각형 마크
의미: FVG 반응 + 추세 변화 신호 확인
신뢰도: ⭐⭐ (낮음)
🟢 3번 조건 - 몸통 돌파 + 새 FVG
조건: 캔들 몸통이 기존 FVG 레벨을 돌파 + 새로운 FVG 형성
표시: 초록색 박스 + 초록색 다이아몬드 마크
의미: 구조적 돌파와 새로운 불균형 생성
신뢰도: ⭐⭐⭐ (보통)
🔴 4번+ 조건 - BOS + 새 FVG (반복)
조건: FVG 터치 → BOS 발생 → 새로운 FVG 형성
표시: 조건 레벨에 따른 색상 박스 + 빨간색 깃발 마크
의미: 추세 전환 확정 및 연속적 강화
신뢰도:
4-6번: ⭐⭐⭐⭐ (높음)
7-9번: ⭐⭐⭐⭐⭐ (매우 높음)
10번+: ⭐⭐⭐⭐⭐⭐ (최고)
🖥️ 인터페이스 설명
시각적 표시
FVG 박스: 각 단계별 Fair Value Gap 영역을 색상별로 표시
조건 라벨: 각 조건 달성 시 상세 정보가 담긴 라벨 표시
백테스트 마크: 차트 하단에 조건별 다른 모양의 마크 표시
통계 테이블: 우상단에 실시간 상태 정보 표시
색상 체계
파란색: 1번 조건 (FVG 형성)
주황색: 2번 조건 (CISD)
초록색: 3번 조건 (몸통 돌파)
남색: 4-5번 조건
적갈색: 6-7번 조건
빨간색: 8-9번 조건
보라색: 10번+ 조건
통계 테이블 항목
현재 조건: 현재 달성된 최고 조건 레벨
신뢰도: 조건 레벨에 따른 신뢰도 (낮음~최고)
상태: 다음 조건을 위해 기다리는 상황
경과바: 마지막 조건 달성 이후 경과한 캔들 수
⚙️ 설정 옵션
표시 옵션
FVG 영역 표시: FVG 박스 표시 여부
조건 라벨 표시: 조건 라벨 표시 여부
연결선 표시: 조건들 간 연결선 표시 여부
통계 표시: 우상단 통계 테이블 표시 여부
백테스트 마크 표시: 차트 하단 마크 표시 여부
필터링 옵션
최소 FVG 크기: 감지할 최소 FVG 크기 (기본 0.0005% = 0.05%)
최대 조건 개수: 추적할 최대 조건 레벨 (기본 20개)
📈 사용 방법
1단계: 기본 설정
트레이딩뷰에서 새 인디케이터 추가
파인스크립트 코드 복사/붙여넣기
저장 후 차트에 적용
2단계: 신호 해석
1번 조건: FVG 형성 확인 (관심 지역 설정)
2-3번 조건: 초기 추세 전환 신호 (관찰 단계)
4-6번 조건: 신뢰할 만한 진입 신호 (거래 고려)
7번+ 조건: 높은 확신의 진입 신호 (적극적 거래)
3단계: 리스크 관리
낮은 조건 (1-3번): 작은 포지션으로 테스트
중간 조건 (4-6번): 적정 포지션 크기
높은 조건 (7번+): 더 큰 포지션 고려 (개인 리스크 관리 원칙 내에서)
🎯 실전 활용 팁
진입 전략
4번 이상 조건: 첫 진입 고려점
7번 이상 조건: 추가 진입 또는 포지션 확대
10번 이상 조건: 최고 신뢰도 진입 기회
청산 전략
반대 방향으로 3번 이상 조건 발생 시 청산 고려
새로운 FVG 형성 후 반대 방향 신호 주의
필터링
시간대: 주요 거래 시간대에서 더 신뢰성 높음
볼륨: 거래량이 평소보다 높을 때 더 유효
시장 상황: 트렌드 시장에서 더 효과적
⚠️ 주의사항
리스크 요소
가짜 신호: 낮은 조건 레벨에서는 가짜 신호 가능
지연 신호: 높은 조건일수록 진입 타이밍이 늦을 수 있음
시장 환경: 횡보 시장에서는 효율성 저하
권장사항
백테스트 필수: 실제 거래 전 충분한 백테스트 진행
다른 지표 병행: 다른 기술적 분석과 함께 사용
자금 관리: 항상 적절한 리스크 관리 원칙 준수
🚀 버전 정보
현재 버전: v1.0
Pine Script v5 기반
최대 500개 라벨/박스/라인 지원
실시간 알림 기능 내장
백테스트 친화적 설계
📞 문의 및 지원
이 알고리즘에 대한 문의사항이나 개선 제안이 있으시면 언제든 연락 주세요. 지속적인 업데이트를 통해 더 나은 도구로 발전시켜 나가겠습니다.
면책 조항: 이 인디케이터는 교육 및 분석 목적으로 제작되었습니다. 실제 거래에서의 손실에 대해서는 책임지지 않으니, 반드시 충분한 테스트와 개인 판단 하에 사용하시기 바랍니다.
Sunmool's Trend Reversal Detection Algorithm User Manual
📋 Algorithm Overview
Sunmool's Trend Reversal Detection Algorithm is a TradingView indicator that utilizes Fair Value Gap (FVG), Change in State of Direction (CISD), and Break of Structure (BOS) concepts to detect trend reversals through progressive stages.
As conditions are met step by step, the reliability of trend reversal increases, tracking up to 20 stages to provide extremely high-confidence signals.
🎯 Core Concepts
Fair Value Gap (FVG)
Definition: Price gap between 3 candles
Bullish FVG: Current candle's low > 2 candles ago high
Bearish FVG: Current candle's high < 2 candles ago low
Purpose: Represents market imbalance, acts as future retracement zone
Change in State of Direction (CISD)
Definition: Change in trend direction
Detection Method: Crossover between short-term MA(5) and long-term MA(10)
Purpose: Confirms initial trend reversal signal
Break of Structure (BOS)
Definition: Breaking through important support/resistance levels
Condition: When both close and high/low exceed the reference level
Purpose: Definitive signal of trend reversal
📊 Stage-by-Stage Conditions
🔵 Condition 1 - FVG Formation
Condition: When Fair Value Gap is formed
Display: Blue box + Blue circle mark
Meaning: Market imbalance occurs, starting point of potential trend reversal
Reliability: ⭐ (Very Low)
🟠 Condition 2 - FVG Touch + CISD
Condition: Price touches Condition 1 FVG → CISD occurs
Display: Orange triangle mark
Meaning: FVG reaction + trend change signal confirmation
Reliability: ⭐⭐ (Low)
🟢 Condition 3 - Body Break + New FVG
Condition: Candle body breaks existing FVG level + new FVG formation
Display: Green box + Green diamond mark
Meaning: Structural breakout and new imbalance creation
Reliability: ⭐⭐⭐ (Medium)
🔴 Condition 4+ - BOS + New FVG (Repeated)
Condition: FVG touch → BOS occurs → new FVG formation
Display: Color-coded boxes by condition level + Red flag mark
Meaning: Trend reversal confirmation and continuous strengthening
Reliability:
4-6: ⭐⭐⭐⭐ (High)
7-9: ⭐⭐⭐⭐⭐ (Very High)
10+: ⭐⭐⭐⭐⭐⭐ (Maximum)
🖥️ Interface Description
Visual Display
FVG Boxes: Color-coded Fair Value Gap zones for each stage
Condition Labels: Detailed information labels when each condition is met
Backtest Marks: Different shaped marks below chart for each condition
Statistics Table: Real-time status information in top-right corner
Color Scheme
Blue: Condition 1 (FVG Formation)
Orange: Condition 2 (CISD)
Green: Condition 3 (Body Break)
Navy: Conditions 4-5
Maroon: Conditions 6-7
Red: Conditions 8-9
Purple: Conditions 10+
Statistics Table Items
Current Condition: Highest condition level achieved
Reliability: Confidence level based on condition level (Low~Maximum)
Status: Current waiting situation for next condition
Bars Since: Number of candles since last condition achievement
⚙️ Settings Options
Display Options
Show FVG Areas: Toggle FVG box display
Show Condition Labels: Toggle condition label display
Show Connection Lines: Toggle connection lines between conditions
Show Statistics: Toggle top-right statistics table
Show Backtest Marks: Toggle chart bottom marks
Filtering Options
Minimum FVG Size: Minimum FVG size to detect (default 0.0005% = 0.05%)
Maximum Conditions: Maximum condition levels to track (default 20)
📈 How to Use
Step 1: Basic Setup
Add new indicator in TradingView
Copy/paste Pine Script code
Save and apply to chart
Step 2: Signal Interpretation
Condition 1: Confirm FVG formation (set interest zone)
Conditions 2-3: Initial trend reversal signals (observation phase)
Conditions 4-6: Reliable entry signals (consider trading)
Conditions 7+: High-confidence entry signals (active trading)
Step 3: Risk Management
Low Conditions (1-3): Test with small position
Medium Conditions (4-6): Appropriate position size
High Conditions (7+): Consider larger position (within personal risk management principles)
🎯 Practical Trading Tips
Entry Strategy
Condition 4+: First entry consideration point
Condition 7+: Additional entry or position increase
Condition 10+: Maximum reliability entry opportunity
Exit Strategy
Consider exit when 3+ conditions occur in opposite direction
Watch for opposite direction signals after new FVG formation
Filtering
Time Frame: More reliable during major trading hours
Volume: More valid when volume is higher than usual
Market Condition: More effective in trending markets
⚠️ Important Warnings
Risk Factors
False Signals: Possible false signals at low condition levels
Delayed Signals: Higher conditions may result in late entry timing
Market Environment: Reduced efficiency in sideways markets
Recommendations
Backtesting Required: Conduct thorough backtesting before live trading
Use with Other Indicators: Combine with other technical analysis
Money Management: Always follow proper risk management principles
🚀 Version Information
Current Version: v1.0
Based on Pine Script v5
Supports up to 500 labels/boxes/lines
Built-in real-time alert functionality
Backtest-friendly design
📞 Support & Contact
If you have any questions about this algorithm or suggestions for improvement, please feel free to contact anytime. We will continue to develop it into a better tool through continuous updates.
Disclaimer: This indicator is created for educational and analytical purposes. We are not responsible for losses in actual trading. Please use it after sufficient testing and personal judgment.
Script su invito
Solo gli utenti approvati dall'autore possono accedere a questo script. È necessario richiedere e ottenere l'autorizzazione per utilizzarlo. Tale autorizzazione viene solitamente concessa dopo il pagamento. Per ulteriori dettagli, seguire le istruzioni dell'autore riportate di seguito o contattare direttamente sunmool_.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Attenzione: prima di richiedere l'accesso, leggi la nostra guida per gli script su invito.
Declinazione di responsabilità
Script su invito
Solo gli utenti approvati dall'autore possono accedere a questo script. È necessario richiedere e ottenere l'autorizzazione per utilizzarlo. Tale autorizzazione viene solitamente concessa dopo il pagamento. Per ulteriori dettagli, seguire le istruzioni dell'autore riportate di seguito o contattare direttamente sunmool_.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Attenzione: prima di richiedere l'accesso, leggi la nostra guida per gli script su invito.