fix: fix the error when profits are zeros

This commit is contained in:
2024-11-09 09:41:16 -05:00
parent 8ac3078ea3
commit 474932c05d

View File

@@ -671,7 +671,7 @@ class LiveReportGenerator:
length = len(profits) length = len(profits)
indexs = list(range(0, length)) indexs = list(range(0, length))
abs_max = math.ceil(max(max(profits), abs(min(profits)))) abs_max = math.ceil(max(max(profits), abs(min(profits)), 0.01))
start = -abs_max - (-abs_max % 10) start = -abs_max - (-abs_max % 10)
end = abs_max + (-abs_max % 10) end = abs_max + (-abs_max % 10)
step = int((end - start) / 10) step = int((end - start) / 10)