diff --git a/web/templates/index.html b/web/templates/index.html
index f22e0db..c9662fa 100644
--- a/web/templates/index.html
+++ b/web/templates/index.html
@@ -294,16 +294,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -328,6 +318,14 @@
+
+
+
+
+
+
+
+
@@ -347,6 +345,14 @@
+
+
+
+
+
+
+
+
@@ -1556,7 +1562,7 @@
});
// 在笔的末端添加macd_div值标记
- if (bi.macd_div && bi.macd_div !== 0) {
+ if (bi.macd_div && bi.macd_div !== 0 && $('#showMainMacdDiv').is(':checked')) {
console.log(`添加macd_div标记: ${bi.macd_div.toFixed(2)}, 在时间点: ${endTime}`);
const macdDivLabel = mainChart.addLineSeries({
@@ -1635,7 +1641,7 @@
});
// 在笔的末端添加macd_div值标记
- if (bi.macd_div && bi.macd_div !== 0) {
+ if (bi.macd_div && bi.macd_div !== 0 && $('#showElementMacdDiv').is(':checked')) {
console.log(`添加元素周期macd_div标记: ${bi.macd_div.toFixed(2)}, 在时间点: ${endTime}`);
const macdDivLabel = mainChart.addLineSeries({
@@ -3796,9 +3802,34 @@
updateTables(data);
}
+ function refreshChartOnly() {
+ // 仅使用当前数据刷新图表显示,不从服务器加载新数据
+ if (currentData) {
+ console.log('仅刷新图表显示,不重新获取数据');
+ refreshChart(currentData);
+ } else {
+ console.log('没有当前数据,无法刷新显示');
+ }
+ }
+
+ // 绑定MACD显示开关
+ $('#showMacd').change(function() {
+ updateChart();
+ });
+
+ // 绑定主周期MACD背离显示开关
+ $('#showMainMacdDiv').change(function() {
+ refreshChartOnly();
+ });
+
+ // 绑定次周期MACD背离显示开关
+ $('#showElementMacdDiv').change(function() {
+ refreshChartOnly();
+ });
+
// 绑定分型类型显示开关
$('#showKlcFxType').change(function() {
- refreshChart(currentData);
+ updateChart();
});
// 绑定小周期分型显示开关
diff --git a/web/templates/index.html.bak b/web/templates/index.html.bak
new file mode 100644
index 0000000..39d66da
--- /dev/null
+++ b/web/templates/index.html.bak
@@ -0,0 +1,3881 @@
+
+
+
+
缠论分析系统
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 仅影响笔、线段和中枢分析
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | 时间 |
+ 开盘价 |
+ 最高价 |
+ 最低价 |
+ 收盘价 |
+ 成交量 |
+
+
+
+
+
+
+
+
+
+
+
+ | 起始时间 |
+ 结束时间 |
+ 起始价格 |
+ 结束价格 |
+ 方向 |
+ MACD背离值 |
+
+
+
+
+
+
+
+
+
+
+
+ | 起始时间 |
+ 结束时间 |
+ 起始价格 |
+ 结束价格 |
+ 方向 |
+
+
+
+
+
+
+
+
+
已完成中枢
+
+
+
+ | 起始时间 |
+ 结束时间 |
+ 中枢上沿(ZG) |
+ 中枢下沿(ZD) |
+
+
+
+
+
+
未完成中枢
+
+
+
+ | 起始时间 |
+ 中枢上沿(ZG) |
+ 中枢下沿(ZD) |
+
+
+
+
+
+
+
+
+
+
+
+ | 时间 |
+ 收盘价 |
+ MACD |
+ 信号线 |
+ 直方图 |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file