ohlcv_chart library

Candlestick (K-line) and market-depth charts for Flutter.

The two entry points are KChartWidget, a fully interactive candlestick chart with indicator overlays, sub-charts and drawing tools, and DepthChart, a bid/ask depth chart.

Classes

AtrIndicator
Average true range: how far price travels per candle.
AwesomeIndicator
Awesome oscillator: the gap between a fast and a slow midpoint average.
BollIndicator
Bollinger bands: a moving average with a band either side of it.
CciIndicator
Commodity channel index.
ChartColors
ChartColors
ChartLine
Shared appearance and interaction state for a user-drawn chart line.
ChartStyle
Geometry of the candlestick chart: paddings, stroke widths, gaps and text sizes.
ChartTranslations
Every piece of text the candlestick chart shows.
DataUtil
Computes every indicator the chart can draw.
DepthBook
An order book prepared for drawing: both sides, each rung's own size, and the totals out to it.
DepthChart
A market-depth chart for one order book.
DepthChartColors
Every colour the depth chart paints with.
DepthChartStyle
Geometry of the depth chart: stroke widths, paddings and text sizes.
DepthChartTranslations
Every piece of text the depth chart shows.
DepthEntity
One point of the depth curve: the cumulative vol out to price.
DepthLadder
An order book as numbers: price, size and running total, one row a level.
DepthLevel
One price level of an order book, with both readings of its volume.
DmiIndicator
Directional movement: +DI, -DI and the ADX.
DonchianIndicator
Donchian channels: the highest high and lowest low of a window.
DrawingStyle
How the drawing tools look, what the editing toolbar offers, and how forgiving the chart is about taps that land near a line.
DrawingTranslations
Every piece of text the line-editing toolbar shows.
ElliottWaveIndicator
Elliott wave labels over the zigzag's pivots.
EmaIndicator
An exponential moving average of the close, drawn over the candles.
FibonacciIndicator
Fibonacci retracement levels over the last swing.
HorizontalLine
A horizontal line pinned to a price, spanning the full chart width.
IchimokuIndicator
Ichimoku Cloud: conversion and base lines, a shaded cloud and the lagging span.
Indicator
One configured indicator: a type, its settings, and optionally its colours.
IndicatorFill
A shaded area between two of an indicator's lines, such as an Ichimoku cloud.
IndicatorLine
One line of an indicator: what it is called and how it is drawn.
IndicatorSeries
An indicator's computed values: one list per line, one entry per candle.
IndicatorSetting
One setting of an indicator type, described so a form can be built from it.
IndicatorType
A kind of indicator that can be added to a chart, and how to configure it.
KChartWidget
An interactive candlestick chart.
KdjIndicator
Stochastic oscillator: %K, %D and %J.
KeltnerIndicator
Keltner channels: an EMA with average-true-range bands either side.
KLineEntity
A single candle, plus the indicator values computed for it.
MacdIndicator
Moving average convergence divergence, with its histogram.
MaIndicator
A simple moving average of the close, drawn over the candles.
MfiIndicator
Money flow index: a volume-weighted relative strength index.
ObvIndicator
On-balance volume: volume signed by each candle's direction.
ResolvedIndicator
An indicator paired with its computed values, ready to draw.
ResolvedIndicators
Every indicator on a chart, computed and split by where it is drawn.
RocIndicator
Rate of change: how far the close has moved over a window, in percent.
RsiIndicator
Relative strength index.
SarIndicator
Parabolic SAR: one dot per candle, flipping side with the trend.
SignalEntity
A labelled price marker painted over the candles.
StochRsiIndicator
Stochastic RSI: where the RSI sits in its own recent range.
SupertrendIndicator
Supertrend: an ATR band that follows price and flips at a reversal.
TimeFormat
Ready-made date patterns for KChartWidget.timeFormat.
TrendLine
A free-form line between two (time, price) points.
TrixIndicator
TRIX: the percentage change of a triple-smoothed average, with its signal.
VerticalLine
A vertical line pinned to a time, spanning the full chart height.
VolumeMaIndicator
A moving average of volume, in its own pane.
VwapIndicator
Volume-weighted average price, accumulated over the candles given.
WrIndicator
Williams %R.
ZigZagIndicator
A zigzag through the swing highs and lows, ignoring moves below depth.

Enums

DepthChartMode
How the depth chart draws an order book.
DepthScale
How volume is spaced up the depth chart's vertical axis.
DrawingTool
The drawing mode the chart is currently in.
IndicatorFormat
How an indicator's values are written out in legends and axis labels.
IndicatorPlacement
Where an indicator is drawn.
IndicatorShape
How one of an indicator's lines is painted.
LineStyle
How a user-drawn line's stroke is painted.
VerticalTextAlignment
Which side of the main chart the price axis labels sit on.

Extensions

IndicatorListEditing on List<Indicator>
Editing helpers for a list of indicators.

Constants

kDefaultDrawingColors → const List<Color>
The colours the line editor offers by default.
kDefaultDrawingThicknesses → const List<double>
The thicknesses the line editor offers by default, in logical pixels.

Properties

indicatorCatalog List<IndicatorType>
Every indicator the chart can draw, with the settings each one takes.
final

Functions

dedupeIndicators(Iterable<Indicator> indicators) List<Indicator>
Drops duplicate indicators, keeping the last of each equal pair.
indicatorTypeOf(Indicator indicator) IndicatorType?
The catalog entry describing indicator, or null if there is none.
resolveIndicators(Iterable<Indicator> indicators, List<KLineEntity>? candles) ResolvedIndicators
Computes indicators over candles, ready for the painters.