feat: rewrite strategy to 10m vol-lead with undying signal + watch alert
- core/strategy.py: full rewrite to Volume Lead strategy - 10m candle direct detection (no 40m resampling) - F&G 3-tier vol threshold: <=40->6x, 41-50->5x, >50->blocked - Undying signal: price drop does not cancel signal (sig_p fixed) - Vol refresh: stronger vol_r updates signal price and timer - Watch alert: 4x-6x approaching threshold notifies via Telegram - WATCH_VOL_THRESH=4.0, WATCH_COOLDOWN_MIN=30, WATCH_VOL_JUMP=0.5 - daemon/runner.py: remove FNG_MIN_ENTRY block and Bear regime block - Only FNG_MAX_ENTRY(>50) blocks scan (greed/extreme greed) - Fast-poll loop cleaned of regime check - core/notify.py: add notify_watch() for near-signal Telegram alerts - Shows vol_r, distance to threshold, price, quiet pct - tests/: add 1y data collection and simulation scripts - collect_1y_data.py, refresh_cache.py - sim_10m_vol.py, sim_current.py, sim_regime_1y.py - sim_regime_sweep.py, sim_vol_override.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -75,7 +75,6 @@ def notify_sell(
|
||||
|
||||
def notify_signal(ticker: str, signal_price: float, vol_mult: float, fng: int = 0) -> None:
|
||||
"""거래량 축적 신호 감지 알림."""
|
||||
from .fng import FNG_MIN_ENTRY
|
||||
fng_label = (
|
||||
"극탐욕" if fng >= 76 else
|
||||
"탐욕" if fng >= 56 else
|
||||
@@ -85,17 +84,36 @@ def notify_signal(ticker: str, signal_price: float, vol_mult: float, fng: int =
|
||||
"극공포"
|
||||
) if fng else ""
|
||||
fng_line = f"F&G: {fng} ({fng_label})\n" if fng else ""
|
||||
warn_line = (
|
||||
f"⚠️ F&G={fng} < {FNG_MIN_ENTRY} → <b>진입차단중</b>\n"
|
||||
if fng and fng < FNG_MIN_ENTRY else ""
|
||||
)
|
||||
from .strategy import TREND_AFTER_VOL
|
||||
target = signal_price * (1 + TREND_AFTER_VOL / 100)
|
||||
_send(
|
||||
f"🔍 <b>[축적감지]</b> {ticker}\n"
|
||||
f"신호가: {signal_price:,.2f}원\n"
|
||||
f"거래량: {vol_mult:.1f}x 급증 + 2h 횡보\n"
|
||||
f"거래량: {vol_mult:.1f}x 급증 + 횡보\n"
|
||||
f"{fng_line}"
|
||||
f"진입 목표: {target:,.2f}원 (+{TREND_AFTER_VOL}%)"
|
||||
)
|
||||
|
||||
|
||||
def notify_watch(
|
||||
ticker: str, price: float, vol_r: float, vth: float, chg: float, fng: int = 0
|
||||
) -> None:
|
||||
"""거래량 근접 관찰 알림 (신호 임계값에 가까워진 종목)."""
|
||||
fng_label = (
|
||||
"극탐욕" if fng >= 76 else
|
||||
"탐욕" if fng >= 56 else
|
||||
"중립" if fng >= 46 else
|
||||
"약공포" if fng >= 41 else
|
||||
"공포" if fng >= 26 else
|
||||
"극공포"
|
||||
) if fng else ""
|
||||
fng_line = f"F&G: {fng} ({fng_label})\n" if fng else ""
|
||||
need = vth - vol_r
|
||||
_send(
|
||||
f"👀 <b>[관찰]</b> {ticker}\n"
|
||||
f"거래량: {vol_r:.1f}x (신호까지 +{need:.1f}x 부족)\n"
|
||||
f"현재가: {price:,.2f}원 | 횡보: {chg:.1f}%\n"
|
||||
f"{fng_line}"
|
||||
f"{warn_line}"
|
||||
f"진입 목표: {signal_price * 1.048:,.2f}원 (+4.8%)"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user