refactor RSI SELL

This commit is contained in:
David Brazda
2023-05-25 20:17:56 +02:00
parent 8cf2956720
commit bf7c1773bd
16 changed files with 736 additions and 231 deletions

View File

@ -131,6 +131,14 @@ def price2dec(price: float, decimals: int = 2) -> float:
"""
return round(price,decimals) if count_decimals(price) > decimals else price
def round2five(price: float):
"""
zatim jen na 3 mista -pripadne predelat na dynamicky
z 23.342 - 23.340
z 23.346 - 23.345
"""
return (round(price*100*2)/2)/100
def count_decimals(number: float) -> int:
"""
Count the number of decimals in a given float: 1.4335 -> 4 or 3 -> 0