Build a candle from validated OHLC
Learning objective: trace every anatomy field back to one input price, verify the range partition, and see why a flat candle returns null normalized ratios.
Stepwise candle anatomy construction
An interactive diagram builds a candle from open, high, low, and close, then reveals body, shadows, range, direction, and normalized proportions.
Validated geometry
Input record
finite · ordered · same unit
price
Distances
Output contract satisfied
Stage 1 of 6
Validate the input
Start with finite OHLC values. The high must contain the body above, and the low must contain it below.
Direction bullish
Range 11
Body 5
Ratios 3:5:3
Legend: dark line = high-low wick; blue hatched block = body; labels preserve meaning if color is unavailable.
Play
Pause
Back
Step
Reset
Example
Canonical O=100 H=108 L=97 C=105
Bearish O=105 H=109 L=98 C=101
Tolerance edge O=100 C=100.005 ε=0.01
Flat O=H=L=C=100
Speed
0.6×
1×
1.6×
2×
Keyboard: Space play/pause · Left/Right Arrow back/step · Home reset