mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-14 08:16:56 +08:00
fix: Correct 4h kline data storage in WebSocket monitor
Fixed critical bug where 4h kline data was incorrectly stored with 3m kline data, causing data mismatch. Changes: - Changed `m.klineDataMap4h.Store(s, klines)` to `klines4h` - Updated log message to use `len(klines4h)` instead of `len(klines)` This bug would cause 4h kline queries to return 3m data, leading to incorrect technical indicator calculations. Fixes: #260 Related: #176
This commit is contained in:
@@ -106,8 +106,8 @@ func (m *WSMonitor) initializeHistoricalData() error {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(klines4h) > 0 {
|
if len(klines4h) > 0 {
|
||||||
m.klineDataMap4h.Store(s, klines)
|
m.klineDataMap4h.Store(s, klines4h)
|
||||||
log.Printf("已加载 %s 的历史K线数据-4h: %d 条", s, len(klines))
|
log.Printf("已加载 %s 的历史K线数据-4h: %d 条", s, len(klines4h))
|
||||||
}
|
}
|
||||||
}(symbol)
|
}(symbol)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user