obv 그래프 오류

This commit is contained in:
Macbook
2026-06-09 02:25:59 +09:00
parent 8670e58c78
commit 7c1cc2ee4b
4 changed files with 58 additions and 13 deletions
+4 -1
View File
@@ -1989,7 +1989,10 @@ function barsKey(bars: OHLCVBar[], market = ''): string {
if (bars.length === 0) return '';
const last = bars[bars.length - 1];
// last.close 제외 — 틱마다 full reload 방지 (실시간은 updateBar/appendBar 경로)
return `${market}:${bars.length}:${bars[0].time}:${last.time}`;
// volume 합계 — STOMP volume=0 → Upbit 폴백 후 OBV 등 지표 재계산 유도
const volSum = bars.reduce((s, b) => s + (Number(b.volume) || 0), 0);
const volFlag = volSum > 0 ? 'v' : '0';
return `${market}:${bars.length}:${bars[0].time}:${last.time}:${volFlag}`;
}
/**