spotbit icon indicating copy to clipboard operation
spotbit copied to clipboard

Code donation

Open k9ert opened this issue 2 years ago • 2 comments

For a couple of years i ran "lovac", the "low volume accumulator". https://twitter.com/lovac27152702 It was a (flask based) stacking app which used the bitstamp API to get prices, place Marketorders on a (daily) basis and, especially proud: a buy-the-dip feature. So the app could detect a drop in price and even show it graphically. I shut it down some month ago and i'm now happy to donate the code if anyone is interested: https://gitlab.com/lovac/lovac-app The code used SQLAlchemy and, for the statistical things pandas.

Here are some places in the code which might be interesting:

  • testing whether the price is dipping via specific Bollingerbands: https://gitlab.com/lovac/lovac-app/-/blob/master/tests/lovac_services_tickerdata_tests.py#L56
  • Various methods to import csv-data-files into the DB: https://gitlab.com/lovac/lovac-app/-/blob/master/lovac/tickerdata/init.py (i used https://bitcoincharts.com/charts/chart.json for that)
  • The statistics for the bollinger-bands: https://gitlab.com/lovac/lovac-app/-/blob/master/lovac/tickerdata/statistics.py
  • THe graphical representation took me some time. If that's a request at some point in time, i might be able to set it up again: image The red bubble represented the buy-the-dip. The bigger the bubble was, the more it bought.

Feel free to close this issue but maybe you find it interesting. Also happy to answer any questions or setup a call. image

k9ert avatar Jul 05 '22 16:07 k9ert

This looks interesting. In particular, I'd like to see some of the price graph stuff you have.

I tried taking a look at it https://gitlab.com/lovac/lovac-app but I'm getting a 404? Did it get deleted there?

ChristopherA avatar Jul 05 '22 19:07 ChristopherA

Oh, sorry, now it's visible. The graphing is based on d3 (version 4, current is 7.x). I copied it from one of the brushing examples which i can't no longer find. Today i'd probably took this one: https://d3-graph-gallery.com/graph/line_brushZoom.html

Here is the meat of it: https://gitlab.com/lovac/lovac-app/-/blob/master/lovac/templates/ticker.html#L95

Data is injected in line 94/95

The maintenance of that project took too much effort for me especially the dependencies. That's the reason i gave up and there also in the meantime lot of better stackingsats alternatives on the market. It might not be that easy to get it to run without some changes.

k9ert avatar Jul 06 '22 07:07 k9ert