Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
3b2296d
attempt to style with newer MPLFinance apis
Mar 19, 2022
83550d4
add more styling options
Mar 20, 2022
e0a96c3
add jupyter hotdogs!
donbing Mar 21, 2022
0fcf4b7
re-arrange notebook
donbing Mar 22, 2022
b19d2d8
better inky what diagram
donbing Mar 22, 2022
6cde335
fiddle with jupyter mplf style
donbing Mar 26, 2022
ee71710
add proto formatting to real chart
donbing Mar 26, 2022
cef1f7c
actually use the formatter
donbing Mar 26, 2022
9779486
correct fig assugnent
donbing Mar 26, 2022
0e16603
shift MPF chart to new file
donbing Mar 26, 2022
92ba400
more file shuffling
donbing Mar 26, 2022
9cd23ad
use my fork of mplfinance
donbing Mar 26, 2022
fb6b2b5
deal with yfinance giving extra columns
donbing Mar 26, 2022
c6b3285
faff with expanded layout
donbing Mar 28, 2022
09a4c3a
chore: autopublish 2022-03-26T22:39:39Z
github-actions[bot] Mar 26, 2022
3c522e6
add missing base style
Mar 26, 2022
260cf9e
volume toggle
Mar 26, 2022
0865310
chore: autopublish 2022-03-26T23:51:56Z
github-actions[bot] Mar 26, 2022
0e263c4
chore: autopublish 2022-03-27T00:03:29Z
github-actions[bot] Mar 27, 2022
b4263ab
fix tight layout issues
donbing Apr 1, 2022
4bdd5b5
chore: autopublish 2022-03-28T22:30:10Z
github-actions[bot] Mar 28, 2022
664fac8
sort tests
donbing Apr 1, 2022
47bdff2
remove extra tight layout call
donbing Apr 2, 2022
384c249
chore: autopublish 2022-04-01T22:27:24Z
github-actions[bot] Apr 1, 2022
4b2c7f7
avoid buttons for waveshare display types
donbing Apr 2, 2022
b079ca4
chore: autopublish 2022-04-02T19:47:13Z
github-actions[bot] Apr 2, 2022
f805585
formatting
donbing Apr 2, 2022
dbd2490
fix datetime comparison of unixtime to months
donbing Apr 2, 2022
5ee147e
formatting
donbing Apr 2, 2022
e7cd78d
update notes
donbing Apr 2, 2022
9b31382
better label var names
donbing Apr 2, 2022
e9860d4
split mpf plot test
donbing Apr 3, 2022
7bdd4ed
change date format
donbing Apr 3, 2022
15c3caa
restore transparency
donbing Apr 3, 2022
7d6316e
update notes
donbing Apr 3, 2022
d57f3ca
allow docker to copy tests
donbing Apr 3, 2022
b0a4bd3
log image resizing
donbing Apr 3, 2022
515ee8a
assert expected res in test
donbing May 6, 2022
7478558
better stock/forex naming
donbing May 8, 2022
9b2b16d
improving layouts
donbing May 8, 2022
4fb28c8
optionally draw entry price line
donbing May 9, 2022
2c15e64
better font for small screens
donbing May 9, 2022
5d85834
even better font for small display
donbing May 9, 2022
ce68841
test for changes
donbing May 9, 2022
a0a5d5f
beef up tests
donbing May 10, 2022
6922797
stop trying to open code on each test
donbing May 10, 2022
89279ca
beef up date limiting for tests
donbing May 10, 2022
f0e0798
date fatt to stabalise new assertion
donbing May 10, 2022
e2d3c62
update small chart images
donbing May 10, 2022
2b71d0d
handle date fails in config
donbing May 10, 2022
5120e5f
addrewss low timeframe probs with yahoo
donbing May 13, 2022
6b4f8c9
profit only for specified entries
donbing May 13, 2022
9b97444
default to no entry price in tests
donbing May 13, 2022
178efc4
support more timeframes for yfinance
donbing May 13, 2022
61b2c01
fixup expanded chart with volume
donbing May 13, 2022
6293992
remove dead images
donbing May 13, 2022
de7fa04
back to tight layout
donbing May 13, 2022
ca1e565
fonts
donbing May 14, 2022
964b997
test all candle configs
donbing May 14, 2022
c319ce8
formatting and comments
donbing May 14, 2022
fc2c797
chore: autopublish 2022-05-14T00:42:02Z
github-actions[bot] May 14, 2022
f219121
Update bitbot_config.py
donbing Oct 25, 2022
e42508d
correcting tests
donbing Oct 26, 2022
c693d5d
chore: autopublish 2022-10-26T19:59:42Z
github-actions[bot] Oct 26, 2022
20bbbce
delete old images
donbing Oct 26, 2022
cbef614
Merge branch 'mpl_finance_api' of https://github.com/donbing/Bitbot
donbing Oct 26, 2022
067296c
chore: autopublish 2022-10-26T20:28:19Z
github-actions[bot] Oct 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
.gitignore
.gitmodules
docs
tests
scripts

docker-compose.yml
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
FROM navikey/raspbian-bullseye:latest as base-image

RUN apt update && \
apt upgrade -y \
apt install -y \
--no-install-recommends \
python3 python3-rpi.gpio libatlas-base-dev libopenjp2-7 libtiff5 libxcb1 libfreetype6-dev \
&& rm -rf /var/lib/apt/lists/*

FROM base-image AS build-image
RUN apt update && \
apt install -y \
RUN apt install -y \
--no-install-recommends \
python3-pip git \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install --upgrade pip
COPY requirements.txt .
RUN pip3 install -v --extra-index-url https://www.piwheels.org/simple --user -r requirements.txt
RUN pip3 install -v --prefer-binary --extra-index-url https://www.piwheels.org/simple --user -r requirements.txt

FROM base-image AS release-image
COPY --from=build-image /root/.local /root/.local
Expand Down
39 changes: 24 additions & 15 deletions config/base.mplstyle
Original file line number Diff line number Diff line change
@@ -1,50 +1,59 @@
figure.dpi: 100
#figure.autolayout: True
#savefig.pad_inches: 0
font.family: sans-serif
font.sans-serif: 04b03
font.weight: light
# figure.autolayout: True
#figure.constrained_layout.use: True

savefig.pad_inches: 0
savefig.transparent: True

font.family: sans-serif
font.sans-serif: basis33

text.hinting_factor:1
text.hinting: native
text.antialiased: False

patch.antialiased: False
lines.antialiased: False

figure.subplot.hspace: 0
figure.frameon: False

axes.facecolor: white
axes.edgecolor: red
axes.linewidth: 0.5
axes.spines.left: True
axes.spines.bottom: True
axes.spines.top: False
axes.spines.right: False
axes.grid: False
# margin between candles and axes
axes.xmargin : 0
axes.ymargin : 0

grid.linestyle: -
grid.linestyle: :
grid.linewidth: 0.5
grid.color: black
axes.edgecolor: red

ytick.major.pad: 0

xtick.color: red
ytick.color: red

xtick.labelcolor: black
ytick.labelcolor: black

xtick.labelsize: 12
ytick.labelsize: 12
xtick.labelsize: 11
ytick.labelsize: 11

xtick.alignment: center
xtick.alignment: left
ytick.alignment: bottom

ytick.major.size: 5
xtick.major.size: 5
xtick.minor.size: 3

xtick.direction: inout
ytick.direction: inout
xtick.direction: in
ytick.direction: in

ytick.major.width: 0.5
xtick.major.width: 0.5
xtick.major.width: 0.5

# xtick.major.pad: 0
6 changes: 2 additions & 4 deletions config/default.expanded.mplstyle
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ axes.spines.top: False
axes.spines.right: False

axes.autolimit_mode: data
axes.xmargin: 0.1
axes.ymargin: 0.1
xtick.major.size: 5
ytick.major.size: 5
xtick.direction: in
ytick.direction: in

ytick.minor.visible: False
xtick.major.pad: -20
ytick.major.pad: -5
xtick.major.pad: -5
ytick.major.pad: -0

figure.subplot.left: 0
figure.subplot.right: 1
Expand Down
5 changes: 5 additions & 0 deletions config/small.mplstyle
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

font.family: sans-serif
font.sans-serif: 04b03
font.weight: light

xtick.labelsize: 6
ytick.labelsize: 6

Expand Down
2 changes: 1 addition & 1 deletion docs/images/HardwareDiagrams/InkyWhat.Diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 11 additions & 3 deletions docs/notes.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
todo:

- ## layout
* fix expanded mode
- fit candle count to screen size
- work out margins, calc mad candles that can fit and generate date to provide set of candles
- keep an eye on the overlay least intrusive position algo, seems to be flaky

- ## multi-currency support
- button to toggle between curencies
- multi-plot display
- overlapping coloured multi-coin charts

- ## impression:
- better button actions!
- make these state-based, so photo mode behaves different to chart mode
Expand Down Expand Up @@ -40,7 +41,7 @@ docker run -e QEMU_CPU=arm1176 --privileged --rm -it --platform linux/arm/v6 bit
# remove all containers
docker container rm $(docker container ls -q -a)
#' which cpus to use for the build
--cpuset-cpus=0-3'
# --cpuset-cpus=0-3'
# wifi-connect docker pull balenablocks/wifi-connect:rpi
docker run --network=host -v /run/dbus/:/run/dbus/ balenablocks/wifi-connect:rpi

Expand All @@ -52,6 +53,13 @@ docker run --network=host -v /run/dbus/:/run/dbus/ balenablocks/wifi-connect:rpi

# test run
docker run --rm --env BITBOT_TESTRUN=true --env BITBOT_OUTPUT=disk --env BITBOT_SHOWIMAGE=false bb
# run tests
docker run --rm \
--name bitbot_tests \
--env BITBOT_TESTRUN=true --env BITBOT_OUTPUT=disk --env BITBOT_SHOWIMAGE=false \
--mount type=bind,source="$(pwd)",target=/code/tests/images \
bb \
python3 -m unittest discover
```

> get linux os version
Expand Down
Loading