fix: 修复主站自动刷新内存泄漏,并完善 chan_tv 图表体验
主站重建前完整 dispose、去掉重复 sync 监听,自动刷新默认增量更新;顺带消除首屏重复 analyze、复用 ChanMACD,以及全版 TV 指标/未完成中枢/布局本地缓存。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -618,14 +618,16 @@ def analyze_chan(df, symbol=None, timeframe=None):
|
||||
bi.cal_macd_div()
|
||||
#print(bi.start_time, bi.macd_hist, bi.macd_div)
|
||||
|
||||
# 添加ChanMACD分析
|
||||
# 添加ChanMACD分析(复用 get_klc_list 内已算好的结果,避免同周期二次全量分析)
|
||||
chan_macd = None
|
||||
chan_macd_data = {}
|
||||
try:
|
||||
|
||||
if klu_list and len(klu_list) > 0:
|
||||
print(f"获取到KLU列表,长度: {len(klu_list)}")
|
||||
chan_macd = ChanMACD(klu_list)
|
||||
chan_macd = getattr(chan, '_last_chan_macd', None)
|
||||
if chan_macd is None:
|
||||
chan_macd = ChanMACD(klu_list)
|
||||
chan_macd_data = {
|
||||
'seg_list': chan_macd.seg_list,
|
||||
'unittf_list': chan_macd.unittf_list,
|
||||
|
||||
Reference in New Issue
Block a user