backend: slope support, gui:add json

This commit is contained in:
David Brazda
2023-04-17 15:26:30 +02:00
parent c7d67fdf65
commit f4fbda7daf
20 changed files with 196 additions and 26 deletions

15
testy/testSlope.py Normal file
View File

@ -0,0 +1,15 @@
sma = list
sma = [28.90, 28.91, 28.91, 28.92, 28.97, 28.99]
slope_lookback = 4
roc_lookback = 4
slope = (sma[-1] - sma[-slope_lookback])/slope_lookback
roc = ((sma[-1] - sma[-roc_lookback])/sma[-roc_lookback])*100
print(slope)
# -1 až 0 klesání
# 0 až 1 stoupání

3
testy/testTelegram.py Normal file
View File

@ -0,0 +1,3 @@
from v2realbot.utils.utils import send_to_telegram
send_to_telegram("nazdarek")