不用大的时间周期了

This commit is contained in:
jackyu66git
2025-09-27 02:26:28 +08:00
parent 6139af98c3
commit 1507f9f929
2 changed files with 7 additions and 8 deletions
+5 -6
View File
@@ -8724,6 +8724,7 @@
'1m': '#FF0000', // 红色
'3m': '#FF6600', // 橙红色
'5m': '#FF9900', // 橙色
'10m': '#DDAA00', // 黄色
'15m': '#FFCC00', // 黄色
'30m': '#99FF00', // 黄绿色
'1h': '#00FF00', // 绿色
@@ -8736,12 +8737,10 @@
'1d': '#9900FF', // 紫红色
'2d': '#CC00FF', // 品红色
'3d': '#FF00CC', // 粉红色
'1w': '#FF0099', // 玫瑰色
'2w': '#FF3366' // 深粉色
};
// 按照预定义顺序排列时间周期
const orderedTimeframes = ['1m', '3m', '5m', '15m', '30m', '1h', '2h', '4h', '6h', '8h', '12h', '16h', '1d', '2d', '3d', '1w', '2w'];
const orderedTimeframes = ['1m', '3m', '5m', '10m', '15m', '30m', '1h', '2h', '4h', '6h', '8h', '12h', '16h', '1d', '2d', '3d'];
// 获取主图表容器
const chartContainer = document.getElementById('tradingview_chart');
@@ -8762,7 +8761,7 @@
color: color,
lineWidth: 1,
lineStyle: 2, // 虚线样式
title: `EMA52-${timeframe}`,
title: ``,
lastValueVisible: false, // 不在价格标尺显示数值
priceLineVisible: false, // 不显示默认价格线
crosshairMarkerVisible: false,
@@ -8802,7 +8801,7 @@
}
// 创建右偏移的时间点(在最后一根K线右边)
const rightOffsetTime = lastTime + timeInterval * 0.3;
const rightOffsetTime = lastTime + timeInterval*100;
// 创建一个新的线系列用于显示文字标记
const markerSeries = tvWidget.mainChart.addLineSeries({
@@ -8826,7 +8825,7 @@
position: 'inBar',
color: color,
shape: 'square',
text: `${timeframe} ${value.toFixed(2)}`,
text: ` ${timeframe} ${value.toFixed(2)}`,
size: 1,
}]);