mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-12 02:41:15 +00:00
fine printing for floats in the roi tables (round to 5 digits after the decimal point)
This commit is contained in:
@@ -113,3 +113,10 @@ def deep_merge_dicts(source, destination):
|
||||
destination[key] = value
|
||||
|
||||
return destination
|
||||
|
||||
|
||||
def round_dict(d, n):
|
||||
"""
|
||||
Rounds float values in the dict to n digits after the decimal point.
|
||||
"""
|
||||
return {k: (round(v, n) if isinstance(v, float) else v) for k, v in d.items()}
|
||||
|
||||
Reference in New Issue
Block a user