SD不需要结束就显示出来,要不然滞后太严重了
This commit is contained in:
+2
-1
@@ -1247,7 +1247,8 @@ def serialize_chan_macd_data(chan_macd_data, client_tz):
|
||||
serialized_data['klu_list'].append({
|
||||
'time': format_time_safely(getattr(klu, 'time', None), client_tz),
|
||||
'continue_div': bool(getattr(klu, 'continue_div', False)),
|
||||
'separate_div': bool(getattr(klu, 'separate_div', False))
|
||||
'separate_div': bool(getattr(klu, 'separate_div', False)),
|
||||
'near0_return': int(getattr(klu, 'near0_return', 0)) if getattr(klu, 'near0_return', 0) is not None else 0
|
||||
})
|
||||
except Exception as e:
|
||||
print(f"序列化klu出错: {e}")
|
||||
|
||||
@@ -3084,6 +3084,17 @@
|
||||
size: 0.6
|
||||
});
|
||||
}
|
||||
// near0_return > 0:在主图显示具体数值
|
||||
if (item.near0_return && Number(item.near0_return) > 0) {
|
||||
kluDivMarkers.push({
|
||||
time: ts,
|
||||
position: 'belowBar',
|
||||
color: '#8bc34a',
|
||||
shape: 'circle',
|
||||
text: `N${Number(item.near0_return)}`,
|
||||
size: 0.6
|
||||
});
|
||||
}
|
||||
});
|
||||
window.kluDivMarkers = kluDivMarkers;
|
||||
} catch (e) {
|
||||
@@ -5120,7 +5131,7 @@
|
||||
if (fx.fx_strength < 1.0) { // 降低阈值,让更多分型显示
|
||||
displayText = fx.fx_strength >= 0.8 ? '' : '' // 0.8以上显示点,0.8以下不显示文本
|
||||
}
|
||||
displayText = fx.fx_type.replace("TOP", "").replace("BOTTOM", "").replace("11", "").replace("21", "").replace("31", "").replace("41", "").replace("51", "");
|
||||
displayText = fx.fx_type.replace("TOP", "").replace("BOTTOM", "").replace("1", "").replace("2", "").replace("3", "").replace("41", "").replace("51", "");
|
||||
// 添加标记配置
|
||||
const markerConfig = {
|
||||
time: timestamp,
|
||||
@@ -5184,7 +5195,7 @@
|
||||
if (fx.fx_strength < 1.0) { // 降低阈值,让更多分型显示
|
||||
displayText = fx.fx_strength >= 1.5 ? '' : '' // 0.8以上显示点,0.8以下不显示文本
|
||||
}
|
||||
displayText = fx.fx_type.replace("TOP", "").replace("BOTTOM", "").replace("11", "").replace("21", "").replace("31", "").replace("41", "").replace("51", "");
|
||||
displayText = fx.fx_type.replace("TOP", "").replace("BOTTOM", "").replace("1", "").replace("2", "").replace("3", "").replace("41", "").replace("51", "");
|
||||
// 添加标记配置
|
||||
const markerConfig = {
|
||||
time: timestamp,
|
||||
@@ -5268,7 +5279,7 @@
|
||||
if (fx.fx_strength < 1.0){ // 调整小周期阈值
|
||||
displayText = fx.fx_strength >= 0.6 ? '' : '' // 0.6以上显示点
|
||||
}
|
||||
displayText = fx.fx_type.replace("TOP", "").replace("BOTTOM", "").replace("11", "").replace("21", "").replace("31", "").replace("41", "").replace("51", "");
|
||||
displayText = fx.fx_type.replace("TOP", "").replace("BOTTOM", "").replace("1", "").replace("2", "").replace("3", "").replace("41", "").replace("51", "");
|
||||
// 小周期分型标记配置
|
||||
const markerConfig = {
|
||||
time: timestamp,
|
||||
@@ -5324,7 +5335,7 @@
|
||||
if (fx.fx_strength < 2.0){ // 调整小周期阈值
|
||||
displayText = fx.fx_strength >= 1.5 ? '' : '' // 0.6以上显示点
|
||||
}
|
||||
displayText = fx.fx_type.replace("TOP", "").replace("BOTTOM", "").replace("11", "").replace("21", "").replace("31", "").replace("41", "").replace("51", "");
|
||||
displayText = fx.fx_type.replace("TOP", "").replace("BOTTOM", "").replace("1", "").replace("2", "").replace("3", "").replace("41", "").replace("51", "");
|
||||
// 小周期KLU分型标记配置
|
||||
const markerConfig = {
|
||||
time: timestamp,
|
||||
@@ -5369,7 +5380,6 @@
|
||||
const combinedMarkers = [
|
||||
...(window.mainFxMarkers || []),
|
||||
...allElementFxMarkers,
|
||||
...((typeof window.showUOnMain === 'undefined' || window.showUOnMain) ? (window.unittfMarkers || []) : []),
|
||||
...(window.kluDivMarkers || [])
|
||||
];
|
||||
if (combinedMarkers.length > 0) {
|
||||
@@ -5393,7 +5403,6 @@
|
||||
// 只设置主周期分型 + UnitTF 标记
|
||||
const onlyMainAndU = [
|
||||
...(window.mainFxMarkers || []),
|
||||
...((typeof window.showUOnMain === 'undefined' || window.showUOnMain) ? (window.unittfMarkers || []) : []),
|
||||
...(window.kluDivMarkers || [])
|
||||
];
|
||||
if (onlyMainAndU.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user