fix: fix the error when profits are zeros
This commit is contained in:
1 parent
8ac3078ea3
commit
474932c05d
1 file changed
+1
-1
@@ -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)
|
||||||
|
|||||||
Reference in new issue
Block a user