diff --git a/ChanLun.py b/ChanLun.py index 30f832e..a7e16f0 100644 --- a/ChanLun.py +++ b/ChanLun.py @@ -49,9 +49,9 @@ class ChanLun(): self.time1y = 12*30*24*60 self.time_M_intervals = [2*30*24*60, 3*30*24*60, 6*30*24*60, 12*30*24*60] self.time_M_symbols = ['2M', '3M', '6M', '1y'] - self.time_symbols = ['1m', '3m', '5m', '15m', '30m', '1h', '2h', '4h', '6h', '8h', '12h', '16h', '1d', '2d', '3d', '1w', '2w', '1M', '3M', '6M', '1y'] + self.time_symbols = ['1m', '3m', '5m', '10m', '15m', '30m', '1h', '2h', '4h', '6h', '8h', '12h', '16h', '1d', '2d', '3d', '1w', '2w', '1M', '3M', '6M', '1y'] self.tf_df_dict = {} - self.ema_symbols = ['1m', '3m', '5m', '15m', '30m', '1h', '2h', '4h', '6h', '8h', '12h', '16h', '1d', '2d', '3d', '1w', '2w'] + self.ema_symbols = ['1m', '3m', '5m', '10m', '15m', '30m', '1h', '2h', '4h', '6h', '8h', '12h', '16h', '1d', '2d', '3d'] def init_data(self, dataframe, intervals, timeframes): for index in range(0, len(intervals)): timeframe = timeframes[index] diff --git a/web/templates/index.html b/web/templates/index.html index d5764d8..7a01d72 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -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, }]);