How to do technical analysis charts / visualizations using Julia?

I had trouble finding good candlestick plotting in the julia ecosystem, but luckily there is a julia vega implementation (GitHub - queryverse/VegaLite.jl: Julia bindings to Vega-Lite) which I used to draw candles and Bollinger bands

ohlcdf |>
@vlplot(x={"dateTime:t"}, width=600) +
@vlplot(
	mark=:rule,
	y={"high:q", scale={zero=false}},
	y2={"low:q", scale={zero=false}}
) +
@vlplot(
	mark=:bar,
	y={"open:q", scale={zero=false}},
	y2={"close:q", scale={zero=false}}
) +
@vlplot(
	mark=:line,
	y={"bblow:q"}
) +
@vlplot(
	mark=:line,
	y={"bbhigh:q"}
)

I find vega to be pretty magical in its ability to always render a “good” looking chart. You can check out my notebook here where I was playing with adding additional technical indicators via raw vegalite json.

11 Likes