111
This commit is contained in:
parent
e21be1b946
commit
b2f994e2e9
@ -65,10 +65,10 @@ class VolatilityMonitor:
|
||||
self,
|
||||
symbols: List[str],
|
||||
on_volatility_spike: Callable[[str, Dict], Any] = None,
|
||||
check_interval: int = 5, # 检查间隔(秒)
|
||||
price_change_threshold: float = 0.5, # 价格变化阈值 0.5%
|
||||
volatility_multiplier: float = 2.0, # 波动率突增倍数
|
||||
cooldown_minutes: int = 3, # 触发后冷却时间(分钟)
|
||||
check_interval: int = 10, # 检查间隔(秒)- 改为10秒减少API调用
|
||||
price_change_threshold: float = 1.0, # 价格变化阈值 1% (原0.5%太敏感)
|
||||
volatility_multiplier: float = 2.5, # 波动率突增倍数 (原2.0)
|
||||
cooldown_minutes: int = 5, # 触发后冷却时间 5分钟 (原3分钟)
|
||||
):
|
||||
"""
|
||||
Args:
|
||||
|
||||
@ -21,8 +21,8 @@ services:
|
||||
|
||||
# Volatility trigger - 波动率触发
|
||||
- ENABLE_VOLATILITY_TRIGGER=true
|
||||
- VOLATILITY_THRESHOLD=0.5
|
||||
- VOLATILITY_COOLDOWN_MINUTES=3
|
||||
- VOLATILITY_THRESHOLD=1.0 # 1% 阈值 (原0.5%太敏感)
|
||||
- VOLATILITY_COOLDOWN_MINUTES=5 # 5分钟冷却 (原3分钟太短)
|
||||
|
||||
# Note: LLM API and DingTalk configs are loaded from .env file
|
||||
|
||||
|
||||
@ -333,8 +333,8 @@ async def main():
|
||||
# 从环境变量获取配置
|
||||
interval = int(os.getenv('SIGNAL_INTERVAL_MINUTES', '5'))
|
||||
enable_volatility = os.getenv('ENABLE_VOLATILITY_TRIGGER', 'true').lower() == 'true'
|
||||
volatility_threshold = float(os.getenv('VOLATILITY_THRESHOLD', '0.5'))
|
||||
volatility_cooldown = int(os.getenv('VOLATILITY_COOLDOWN_MINUTES', '3'))
|
||||
volatility_threshold = float(os.getenv('VOLATILITY_THRESHOLD', '1.0')) # 1% 阈值 (原0.5%太敏感)
|
||||
volatility_cooldown = int(os.getenv('VOLATILITY_COOLDOWN_MINUTES', '5')) # 5分钟冷却 (原3分钟)
|
||||
|
||||
logger.info("=" * 60)
|
||||
logger.info("Signal Scheduler 配置:")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user