Merge pull request #1871 from hroff-1902/edge-no-trades
edge: handle properly the 'No trades' case
This commit is contained in:
commit
1a5dbd29e0
@ -139,6 +139,7 @@ class Edge():
|
|||||||
|
|
||||||
# If no trade found then exit
|
# If no trade found then exit
|
||||||
if len(trades) == 0:
|
if len(trades) == 0:
|
||||||
|
logger.info("No trades found.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Fill missing, calculable columns, profit, duration , abs etc.
|
# Fill missing, calculable columns, profit, duration , abs etc.
|
||||||
|
@ -73,9 +73,10 @@ class EdgeCli(object):
|
|||||||
floatfmt=floatfmt, tablefmt="pipe")
|
floatfmt=floatfmt, tablefmt="pipe")
|
||||||
|
|
||||||
def start(self) -> None:
|
def start(self) -> None:
|
||||||
self.edge.calculate()
|
result = self.edge.calculate()
|
||||||
print('') # blank like for readability
|
if result:
|
||||||
print(self._generate_edge_table(self.edge._cached_pairs))
|
print('') # blank line for readability
|
||||||
|
print(self._generate_edge_table(self.edge._cached_pairs))
|
||||||
|
|
||||||
|
|
||||||
def setup_configuration(args: Namespace) -> Dict[str, Any]:
|
def setup_configuration(args: Namespace) -> Dict[str, Any]:
|
||||||
|
Loading…
Reference in New Issue
Block a user