默认主/次/次次改为 45m/15m/5m、开始时间一周;SD/CD 按 hist 摆位置和箭头;去掉笔线段背驰与第四类勾选。 Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
740 B
JavaScript
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);
|
|
}
|
|
}
|