|
@ -175,10 +175,6 @@ function initQXNLZHEcharts(kline, qxnlzhqData) { |
|
|
const priceValues = kline.flatMap(item => [item[1], item[2], item[3], item[4]]); |
|
|
const priceValues = kline.flatMap(item => [item[1], item[2], item[3], item[4]]); |
|
|
const dataMin = Math.min(...priceValues); |
|
|
const dataMin = Math.min(...priceValues); |
|
|
const dataMax = Math.max(...priceValues); |
|
|
const dataMax = Math.max(...priceValues); |
|
|
// 获取最后一根K线数据 |
|
|
|
|
|
const lastKLine = mixData[mixData.length - 1]; |
|
|
|
|
|
const lastHigh = lastKLine.value[2]; // 最高价 |
|
|
|
|
|
const lastLow = lastKLine.value[3]; // 最低价 |
|
|
|
|
|
// 计算止盈止损价格 |
|
|
// 计算止盈止损价格 |
|
|
const stopProfitPrice = Number(qxnlzhqData.cc) * 1.05; // 止盈价 |
|
|
const stopProfitPrice = Number(qxnlzhqData.cc) * 1.05; // 止盈价 |
|
|
const stopLossPrice = Number(qxnlzhqData.cc) * 0.97; // 止损价 |
|
|
const stopLossPrice = Number(qxnlzhqData.cc) * 0.97; // 止损价 |
|
@ -385,16 +381,19 @@ const lastLow = lastKLine.value[3]; // 最低价 |
|
|
// show: false, |
|
|
// show: false, |
|
|
lineStyle: { |
|
|
lineStyle: { |
|
|
color: 'white', // x轴线颜色 |
|
|
color: 'white', // x轴线颜色 |
|
|
|
|
|
width:3 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
splitLine: { |
|
|
splitLine: { |
|
|
show: false, |
|
|
show: false, |
|
|
}, |
|
|
}, |
|
|
axisLabel: { // 刻度标签 |
|
|
axisLabel: { // 刻度标签 |
|
|
show: false // 不显示刻度标签 |
|
|
|
|
|
|
|
|
show: true, |
|
|
|
|
|
color:'white', |
|
|
}, |
|
|
}, |
|
|
axisTick: { // 刻度线 |
|
|
axisTick: { // 刻度线 |
|
|
show: false // 不显示刻度线 |
|
|
|
|
|
|
|
|
show: true, |
|
|
|
|
|
color:'white', |
|
|
}, |
|
|
}, |
|
|
min: |
|
|
min: |
|
|
qxnlzhqData.dd < stopLossPrice * 0.98 |
|
|
qxnlzhqData.dd < stopLossPrice * 0.98 |
|
@ -583,7 +582,7 @@ const lastLow = lastKLine.value[3]; // 最低价 |
|
|
textBorderWidth: 2, |
|
|
textBorderWidth: 2, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
offset: [20, 10] |
|
|
|
|
|
|
|
|
offset: [0, 10] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -623,7 +622,7 @@ const lastLow = lastKLine.value[3]; // 最低价 |
|
|
textBorderWidth: 2, |
|
|
textBorderWidth: 2, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
offset: [20, -10] |
|
|
|
|
|
|
|
|
offset: [0, -10] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|