Stock trading in Elixir

Welcome back :slight_smile:. I can give a longer response later, gotta make this one brief.

TimescaleDB is a postgres extension / plugin / add-on, whatever it’s called, so you get all the goodness of ecto, but optimized for time series data.

Glad we’re all thinking generally the same way! This is exciting! And yes, I think we should get some documentation together to organize planning.

@GunnarPDX from our DM chat, here’s my first pass on pattern detection:
https://github.com/rm-rf-etc/ohlc-pattern-detection

The approach is to (1) extract the reversals from the chart (the maximum highs and lows forming a zig-zag through the chart), then (2) normalize the set, and finally (3) test the set with some rules. I’ve only gotten as far as steps 1 and 2. My thinking is based on the books by Thomas Bulkowsky and what I’ve read of his method on his website, as well as a Medium post which described something very similar.

Also, this approach assumes you will use E.take/2 to grab your maximum size sample from your chart, and then you iterate over the reversals, continually dropping 1 off the beginning in each iteration, then normalize, and then test again. This way you will be scanning for a pattern of any length between your minimum and your maximum length.