Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

OHLC bar chart

Pre-candlestick OHLC visualisation. A thin vertical line for the period range with two small horizontal ticks — left = open, right = close. More compact than candles for dense charts; preferred by some traders.

The demo plots the same dataset as the candlestick chapter: the Dow Jones across the Wall Street Crash of 1929 (Oct 21–30, including the three Black days). The OHLC encoding makes the open / close ticks easier to compare across consecutive sessions when range spans are large.

Source: Wall Street Crash of 1929 — Wikipedia

Public surface

use wisp_chart::finance::{Ohlc, Period};

let o = Ohlc::new(vec![
    Period::new(100.0, 110.0, 95.0, 108.0),
    /* ... */
]);
let g = o.emit_graphics(&theme, Vec2::new(480.0, 240.0));

Tick length is tick_length_fraction × band_width (default 0.3).