Files
Chan/web/static/js/app/chart_tv.js
T
jackyu66gitandCursor c22cd48f36 Web 加上资金面/情绪叠图,并收紧默认图面。
默认主/次/次次改为 45m/15m/5m、开始时间一周;SD/CD 按 hist 摆位置和箭头;去掉笔线段背驰与第四类勾选。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 02:25:44 +08:00

28 lines
740 B
JavaScript

/* chart_tv.js — facade: initTradingView orchestrates split modules */
function initTradingView(symbol, timeframe) {
try {
disposeTradingViewCharts();
console.log('初始化TradingView图表:', symbol, timeframe);
var ctx = {
symbol: symbol,
timeframe: timeframe
};
chartTvBuildShell(ctx);
if (!ctx.mainChart) {
return;
}
chartTvRenderIndicators(ctx);
chartTvRenderChan(ctx);
chartTvRenderOverlays(ctx);
chartTvFinalize(ctx);
if (window.ChanDeriv) ChanDeriv.loadOverlays();
console.log('图表初始化完成');
} catch (e) {
console.error('图表初始化错误:', e);
}
}