fix: 实时检测优先使用本地DB,与扫描结果数据源统一
将 _get_kline_data 的 use_local_db 从 False 改为 True, 确保实时检测与全景扫描使用同一份K线数据, 避免因数据源不同导致信号判定结果不一致。
This commit is contained in:
@@ -1327,8 +1327,8 @@ def get_scan_strategy():
|
||||
|
||||
|
||||
def _get_kline_data(stock_code, days=120):
|
||||
"""获取K线数据 — 委托给 services.stock_algorithms.get_kline_data(实时分析不用本地DB缓存)"""
|
||||
return algo_get_kline_data(stock_code, days=days, use_local_db=False)
|
||||
"""获取K线数据 — 优先本地DB(与扫描结果数据源一致),未命中时回退到外部API"""
|
||||
return algo_get_kline_data(stock_code, days=days, use_local_db=True)
|
||||
|
||||
|
||||
@bp.route('/bull_stocks', methods=['GET'])
|
||||
|
||||
Reference in New Issue
Block a user