Candle windowing is a boring detail that matters a lot. If the candle range drifts (even slightly), charts become misleading and score components (ROI, drawdown, time-above) can be wrong. OpenKol uses a strict windowing approach to keep everything aligned.Documentation Index
Fetch the complete documentation index at: https://docs.openkol.net/llms.txt
Use this file to discover all available pages before exploring further.
The windowing issue
Market data providers often return candles in ranges that are:- aligned to UTC boundaries, or
- bucketed by day/week segments
- off-by-one candles
- missing the exact call candle
- drift across daily/weekly boundaries
Request strategy
OpenKol requests candles using a UTC-aligned anchor and a predictable range:- Round the anchor timestamp to UTC midnight
- For weekly ranges, step in 7-day blocks
- Request candles with explicit timezone handling (UTC)
Trimming to the analysis window
After fetching candles:- Compare each candle timestamp to the call time
- Keep only candles that fall inside the selected analysis window
- Ensure the returned window matches the resolution (5m, 15m, 1h, 4h, 12h, 1d)
Outcome
This approach:- keeps charts anchored to the call timestamp
- prevents drift across daily/weekly ranges
- reduces subtle off-by-one bugs that change ROI or drawdown