Overview
MagicTradeBot의 정밀 설정(Precision Configuration) 시스템은 신호의 품질과 수량을 완전히 제어할 수 있도록 해줍니다. 15개 이상의 신호 유형 각각은 tradesettings.yaml에 전용 설정 섹션을 가지고 있어, 높은 빈도·높은 노이즈의 공격적 설정부터 낮은 빈도·높은 신뢰도의 보수적 설정까지 세밀한 조정이 가능합니다. 이 정교한 제어 기능을 통해 수천 개의 심볼을 스캔하고, 사용자 위험 프로필에 맞는 최상의 기회만 선별할 수 있습니다.
품질 vs 수량 트레이드오프
신호 엄격도 스펙트럼
공격적 ←――――――――――――――――――――――――――――――――――→ 보수적 (많은 신호) (높은 품질) 더 많은 신호 더 적은 신호 낮은 승률 높은 승률 높은 위험 낮은 위험 활발한 트레이딩 선택적 트레이딩
핵심 원리: 기준을 더 엄격하게 설정하면 신호는 줄어들지만 성공 확률은 높아지고, 기준을 느슨하게 설정하면 신호는 많아지지만 오탐(false positive)이 증가합니다.
설정 철학
모든 신호 매개변수는 다음 세 가지 축을 기준으로 조정할 수 있습니다:
- 민감도 – 신호가 얼마나 쉽게 발생하는가(임계값)
- 확인 조건 – 몇 개의 조건이 동시에 충족되어야 하는가(다중 요인 요구)
- 필터링 – 추가적으로 충족해야 하는 조건(거래량, 변동성 등)
설정 구조
모든 신호 설정은 tradesettings.yaml에 중앙 집중식으로 구성됩니다:
yaml
signals:
rsi:
enabled: true
oversold_threshold: 30
overbought_threshold: 70
# ... RSI 관련 추가 설정
macd:
enabled: true
fast_period: 12
slow_period: 26
# ... MACD 관련 추가 설정
# ... 기타 모든 신호 설정
각 섹션은 독립적으로 설정 가능하므로, 일부 신호는 공격적으로, 다른 신호는 보수적으로 조합하여 사용할 수 있습니다.
신호별 상세 설정 옵션
RSI 신호 설정
목적: 과매수/과매도 민감도 및 다이버전스 감지 조정
yaml
rsi:
enabled: true
period: 14
# 임계값 설정
oversold_threshold: 30
overbought_threshold: 70
# 품질 필터
require_volume_confirmation: true
min_volume_multiplier: 1.5
# 다이버전스 설정
enable_divergence_detection: true
divergence_lookback: 20
divergence_min_strength: 0.6
# 신호 필터링
ignore_in_strong_trends: true
min_price_move_percent: 0.5
튜닝 가이드:
- 더 많은 신호: oversold=40, overbought=60, require_volume=false
- 더 좋은 신호: oversold=20, overbought=80, require_volume=true, min_strength=0.8
MACD 신호 설정
목적: 골든·데드 크로스 감지 및 히스토그램 임계값 미세 조정
yaml
macd:
enabled: true
# 기간 설정
fast_period: 12
slow_period: 26
signal_period: 9
# 신호 트리거
trigger_on_crossover: true
trigger_on_histogram_flip: true
trigger_on_divergence: true
# 품질 필터
min_histogram_value: 0.0001
require_momentum_confirmation: true
min_bars_since_last_signal: 5
# 다이버전스
divergence_lookback: 15
divergence_min_strength: 0.65
# 시장 컨텍스트 필터
ignore_choppy_markets: true
choppiness_threshold: 61.8
튜닝 가이드:
- 더 많은 신호: fast=8, slow=17, min_histogram=0, ignore_choppy=false
- 더 좋은 신호: fast=16, slow=35, min_histogram=0.0005, min_bars=10
볼린저 밴드 구성
목적: 변동성 민감도와 평균 회귀 엄격성 제어
yaml
bollinger_bands:
enabled: true
period: 20
std_dev: 2.0
trigger_on_touch: true
trigger_on_break: false
require_reversal_candle: true
min_band_width_percent: 2.0
max_band_width_percent: 10.0
require_volume_spike: true
min_volume_ratio: 1.3
enable_squeeze_alerts: true
squeeze_threshold: 1.5
squeeze_breakout_multiplier: 2.0
require_price_return_to_middle: false
조정 가이드:
- 더 많은 신호: std_dev=1.5, trigger_on_break=true, require_reversal=false
- 더 나은 신호: std_dev=2.5, min_band_width=3.0, require_volume=true
ATR 신호 구성
목적: 변동성 확장 임계값과 돌파 기준 정의
yaml
atr:
enabled: true
period: 14
breakout_multiplier: 1.5
min_atr_expansion_percent: 20
lookback_for_expansion: 10
require_volume_confirmation: true
min_volume_multiplier: 1.8
require_directional_close: true
close_position_percent: 0.8
min_bars_in_consolidation: 5
max_prior_volatility: 2.5
ignore_gaps: true
ignore_news_hours: true
조정 가이드:
- 더 많은 신호: multiplier=1.2, min_expansion=10, min_bars=3
- 더 나은 신호: multiplier=2.0, min_expansion=30, min_bars=8, volume=2.0x
거래량 신호 구성
목적: 비정상적인 거래량 감지를 위한 임계값 설정
yaml
volume:
enabled: true
lookback_period: 20
spike_multiplier: 2.0
detect_buying_volume: true
detect_selling_volume: true
detect_climax_volume: true
min_candle_body_percent: 40
require_price_confirmation: true
min_price_move_percent: 1.0
climax_multiplier: 4.0
climax_lookback: 50
signal_reversal_after_climax: true
use_volume_profile: true
significant_level_volume_ratio: 1.5
ignore_low_liquidity_symbols: true
min_dollar_volume: 100000
조정 가이드:
- 더 많은 신호: multiplier=1.5, min_body=30, min_move=0.5
- 더 나은 신호: multiplier=3.0, min_body=60, climax=5.0, dollar_volume=500k
모멘텀 / 속도 신호 구성
목적: 변화율 가속 감지
yaml
momentum_velocity:
enabled: true
momentum_period: 10
velocity_lookback: 5
min_momentum_percent: 2.0
min_velocity_increase: 1.5
require_sustained_momentum: true
min_consecutive_periods: 3
require_volume_increase: true
enable_momentum_divergence: true
divergence_lookback: 15
divergence_sensitivity: 0.7
ignore_choppy_conditions: true
max_directional_changes: 2
require_trend_alignment: true
trend_timeframe_multiplier: 4
조정 가이드:
- 신호 증가: period=5, min_momentum=1.0, consecutive=2, require_trend=false
- 신호 최적화: period=20, min_momentum=3.0, consecutive=5, velocity=2.0
RSI 다이버전스 구성
목적: 다이버전스 민감도 세밀 조정
yaml
rsi_divergence:
enabled: true
lookback_period: 20
min_pivot_strength: 3
min_pivots_required: 2
min_divergence_angle: 15
min_rsi_difference: 5
min_price_difference_percent: 1.0
require_volume_confirmation: true
volume_must_decrease: true
require_trend_context: true
detect_hidden_divergence: true
hidden_requires_stricter_rules: true
ignore_in_consolidation: true
min_atr_for_signal: 0.5
조정 가이드:
- 신호 증가: lookback=10, pivot=2, angle=10, volume=false
- 신호 최적화: lookback=30, pivot=5, angle=25, rsi_diff=8
VWAP & 밴드 구성
목적: VWAP 편차 밴드 로직 구성
yaml
vwap:
enabled: true
reset_period: "daily"
use_cumulative: true
enable_bands: true
band_1_std_dev: 1.0
band_2_std_dev: 2.0
band_3_std_dev: 3.0
trigger_on_band_touch: true
trigger_level: 2
require_rejection_candle: true
min_distance_from_vwap_percent: 0.5
require_volume_at_level: true
volume_percentile_threshold: 70
require_return_toward_vwap: true
min_reversion_percent: 30
max_bars_for_reversion: 5
ignore_trending_markets: false
min_time_from_reset: 60
조정 가이드:
- 신호 증가: trigger_level=1, min_distance=0.2, rejection=false
- 신호 최적화: trigger_level=3, min_distance=1.0, volume_percentile=80
CVD (누적 거래량 델타) 구성
목적: 압력 불균형 감지
yaml
cvd:
enabled: true
lookback_period: 100
enable_divergence_signals: true
divergence_lookback: 20
min_divergence_strength: 0.7
cvd_trend_period: 20
min_cvd_trend_strength: 0.6
trigger_on_divergence: true
trigger_on_trend_change: true
trigger_on_exhaustion: true
min_cvd_change_percent: 10
require_price_confirmation: true
min_price_move_percent: 0.8
exhaustion_lookback: 10
exhaustion_threshold: 0.3
require_volume_divergence: true
ignore_low_volume_periods: true
min_volume_for_valid_cvd: 1.5
조정 가이드:
- 신호 증가: lookback=50, min_change=5, exhaustion=0.5
- 신호 최적화: lookback=200, min_change=20, strength=0.8, volume_divergence=true
멀티 타임프레임 정렬 구성
목적: 여러 차트 간 정렬 규칙 정의
yaml
multi_timeframe:
enabled: true
base_timeframe: "5m"
higher_timeframes:
- "15m"
- "1h"
- "4h"
require_all_aligned: false
min_alignment_percent: 75
primary_signals:
- "RSI"
- "MACD"
- "MOMENTUM"
confirmation_signals:
- "TREND_DIRECTION"
- "REGIME"
trend_indicator: "EMA"
trend_periods:
fast: 20
slow: 50
require_higher_tf_trend: true
min_higher_tf_strength: 0.6
ignore_conflicting_signals: true
weight_by_timeframe: true
timeframe_weights:
"5m": 1.0
"15m": 1.5
"1h": 2.0
"4h": 3.0
조정 가이드:
- 신호 증가: alignment=50, require_higher_tf_trend=false, check 2 TF
- 신호 최적화: alignment=100, require_all=true, check 4+ TF
시장 상태 감지 구성
목적: 트렌드, 횡보, 변동성, 안정적 시장 조건 감지
yaml
market_regime:
enabled: true
lookback_period: 50
trend_indicator: "ADX"
trend_threshold: 25
range_indicator: "CHOPPINESS"
range_threshold: 61.8
volatility_measure: "ATR_PERCENTILE"
high_volatility_threshold: 70
low_volatility_threshold: 30
signal_on_regime_change: true
require_confirmation_bars: 3
adjust_other_signals: true
regime_adjustments:
trending:
rsi_overbought: 80
rsi_oversold: 20
follow_trend_only: true
ranging:
bb_std_dev: 1.5
enable_mean_reversion: true
disable_breakout_signals: true
volatile:
atr_multiplier: 2.5
reduce_position_size: 0.5
calm:
atr_multiplier: 1.2
increase_position_size: 1.2
조정 가이드:
- 신호 증가: lookback=20, trend_threshold=20, confirm=1
- 신호 최적화: lookback=100, trend_threshold=30, confirm=5
BTC 대비 상대 강도(Relative Strength) 구성
목적: 비교 지표 및 우월성(Outperformance) 임계값 설정
BTC 대비 상대 강도(Relative Strength) 구성
목적: 비교 지표 및 우월성 임계값 설정
relative_strength:
enabled: true
# RS 계산
lookback_period: 20 # 20 기간 동안 RS 계산
# 단기 = 10, 장기 = 50
comparison_symbol: "BTCUSDT" # 기본 비교 자산
# 강도 임계값
min_outperformance_percent: 5 # 최소 5% 이상 초과 성과 필요
# 공격적 = 2, 보수적 = 10
min_consecutive_periods: 3 # 연속 3봉 동안 초과 성과 필요
# 품질 필터
require_volume_confirmation: true
min_relative_volume: 1.2 # 심볼 거래량 > BTC 상대 거래량의 1.2배
require_absolute_gain: true # 심볼과 BTC 모두 양수여야 함 (강세장)
allow_absolute_loss_outperformance: false # 둘 다 하락 시 신호 금지
# 발산(Divergence) 감지
detect_rs_divergence: true # 가격 약세이지만 RS 강세
divergence_lookback: 15
# 추세 정렬
require_btc_trend_agreement: false # BTC 반대 신호 허용
btc_trend_threshold: 0.5 # 필요 시 BTC 추세 강도 필요
# 돌파(Breakout) 감지
detect_rs_breakout: true # RS가 이전 고점을 돌파
rs_breakout_lookback: 50
rs_breakout_buffer: 0.95 # 조회 기간 최고치의 95% 이상이어야 함
튜닝 가이드:
- 신호 수 증가: min_outperformance=2, consecutive=2, require_absolute=false
- 신호 품질 향상: min_outperformance=10, consecutive=5, require_volume=true
주문 흐름 불균형(OFI) 구성
목적: 주문서 불균형 감지 민감도 설정
order_flow_imbalance:
enabled: true
# OFI 계산
calculation_window: 5 # 5 틱/봉 동안 불균형 측정
# 매우 빠름 = 3, 표준 = 5, 느림 = 10
# 불균형 임계값
min_imbalance_ratio: 2.0 # 매수/매도 비율 > 2.0 또는 < 0.5
# 공격적 = 1.5, 보수적 = 3.0
min_imbalance_volume: 10000 # 유효 OFI 신호를 위한 최소 거래량
# 품질 필터
require_sustained_imbalance: true
min_sustained_periods: 3 # 불균형이 3 계산 기간 동안 지속되어야 함
require_price_confirmation: true
min_price_move_with_ofi: 0.1 # 가격이 OFI 방향으로 ≥0.1% 이동해야 함
# 소진(Exhaustion) 감지
detect_ofi_exhaustion: true # OFI 약화 = 반전
exhaustion_ratio_threshold: 1.2 # 불균형이 1.2 미만으로 하락
# 컨텍스트 필터
ignore_low_liquidity: true
min_order_book_depth: 50000 # 최우선 호가에서 $50k 이상 요구
ignore_spread_widening: true # 스프레드가 정상보다 클 때 신호 무시
max_spread_multiplier: 2.0
# 시간 기반 필터
ignore_market_open_close: true # 세션 시작/종료 5분 무시
open_close_buffer_minutes: 5
튜닝 가이드:
- 신호 수 증가: window=3, ratio=1.5, sustained=2, price_move=0.05
- 신호 품질 향상: window=10, ratio=3.0, sustained=5, depth=100k
혼조도 지수(Choppiness Index) 구성
목적: 추세장 vs 혼조장 식별 임계값 정의
choppiness_index:
enabled: true
# 혼조도 계산
period: 14 # 표준 = 14, 빠름 = 7, 느림 = 21
# 구간 임계값
choppy_threshold: 61.8 # Chop > 61.8 = 혼조/횡보
trending_threshold: 38.2 # Chop < 38.2 = 강한 추세
# 공격적: 55/45, 보수적: 65/35
# 신호 생성
signal_on_transition: true # 임계값 교차 시 신호
require_confirmation_bars: 2 # 교차 후 2봉 대기
signal_direction_from: # 매수/매도 판단 방법
method: "PRICE_MOMENTUM" # 옵션: "PRICE_MOMENTUM", "BREAKOUT_DIRECTION", "CUSTOM"
lookback: 10
# 품질 필터
min_time_in_chop: 10 # 돌파 신호 전 ≥10봉 혼조 필요
max_time_in_chop: 50 # 혼조가 50봉 초과 시 신호 금지
require_volume_expansion: true # 돌파 시 거래량 증가 필요
min_volume_multiplier: 1.5
# 통합 사용
use_as_filter_only: false # True = 다른 신호 필터용만, 자체 신호 생성 금지
filter_other_signals_in_chop: true # 혼조 시 특정 신호 비활성화
signals_to_disable_in_chop:
- "BREAKOUT"
- "MOMENTUM"
- "TREND_FOLLOWING"
signals_to_enable_in_chop:
- "MEAN_REVERSION"
- "RANGE_TRADING"
튜닝 가이드:
- 신호 수 증가: thresholds=55/45, confirmation=1, min_time=5
- 신호 품질 향상: thresholds=65/35, confirmation=3, min_time=15, max_time=30