edge: handle properly the 'No trades' case
This commit is contained in:
parent
6dc2175e1f
commit
2c9a519c5e
@ -139,6 +139,7 @@ class Edge():
|
||||
|
||||
# If no trade found then exit
|
||||
if len(trades) == 0:
|
||||
logger.info("No trades created.")
|
||||
return False
|
||||
|
||||
# Fill missing, calculable columns, profit, duration , abs etc.
|
||||
|
@ -73,7 +73,8 @@ class EdgeCli(object):
|
||||
floatfmt=floatfmt, tablefmt="pipe")
|
||||
|
||||
def start(self) -> None:
|
||||
self.edge.calculate()
|
||||
result = self.edge.calculate()
|
||||
if result:
|
||||
print('') # blank like for readability
|
||||
print(self._generate_edge_table(self.edge._cached_pairs))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user