Read the two bands on the selected timeframe
The application uses two Bollinger windows: 20 candles and 90 candles, both with a two-standard-deviation distance. It also displays EMA20 and EMA50. The 90-candle window is an application setting, not a universal Bollinger default.
Period means candles, not automatically days
At 1H, a 20-candle window spans about 20 hours of evenly spaced candles; at 4H, it spans about 80 hours. Switching the interval changes the information in the window even if the label “20” stays the same. Comparing a 1H breakout to a 4H chart requires recording both intervals.
| Displayed item | Calculation / purpose | It does not establish |
|---|---|---|
| BOLL20 | 20-candle mean with upper/lower bands at ±2 standard deviations | A confirmed reversal or profitable entry |
| BOLL90 | Same calculation over 90 candles | A separate higher-timeframe chart |
| EMA20 / EMA50 | Exponential averages with different response speeds | A complete trend or risk model |
For the same window, the lower band must lie below the middle and the upper band above it, unless the price variation is zero. This is also a useful implementation sanity check: upper = mean + 2 × standard deviation; lower = mean − 2 × standard deviation.
A touch, a crossing and a closed candle are different
A high or low touching a band is not the same as the close crossing it. The chart checks whether one close moves from inside to outside a band relative to the preceding candle. This describes a price event; it does not decide whether you should take a position.
Check the candle completion flag
OKX candle responses include a confirm field: 0 denotes an unfinished candle and 1 a finished candle. The latest candle can still change. The chart calculates its crossing on completed candles and separately labels the live last price.
- Check data retrieval time and the last completed candle time.
- Compare the previous close with its own band and the new completed close with its own band.
- If price moves back inside later, record that later event; do not rewrite the earlier observation.
- If several bands cross together, keep both observations instead of forcing one label.
A trend can continue along a band and a breakout can fail. Record what would invalidate your interpretation, the timeframe you will reassess and the information still missing. A chart marker alone cannot supply those decisions.
Sources, review scope and open questions
Reviewed 12 October 2026. Application-specific descriptions come from the existing frontend and PHP source inspected for this rebuild. External documentation explains candle fields and indicator definitions; it does not validate this application’s performance.
- OKX API documentation — instruments and candlestick fields ↗
- Fidelity — Bollinger Bands definition and limits ↗
- Still to verify: live BTC contract specifications and exchange fee/funding conditions.
- Still to verify: a successful market connection and matched completed candles.
- Still to verify: account integration, AI request freshness and quota behavior.
- Still to verify: historical outcome rules, sample integrity and included trading costs.