1
This commit is contained in:
parent
8cb9bbf42f
commit
c1a9d52ae7
|
|
@ -762,10 +762,10 @@ class Trade:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if start_timestamp is not None:
|
if start_timestamp is not None:
|
||||||
query += " AND entry_time >= %s"
|
query += " AND COALESCE(exit_time, entry_time) >= %s"
|
||||||
params.append(start_timestamp)
|
params.append(start_timestamp)
|
||||||
if end_timestamp is not None:
|
if end_timestamp is not None:
|
||||||
query += " AND entry_time <= %s"
|
query += " AND COALESCE(exit_time, entry_time) <= %s"
|
||||||
params.append(end_timestamp)
|
params.append(end_timestamp)
|
||||||
if symbol:
|
if symbol:
|
||||||
query += " AND symbol = %s"
|
query += " AND symbol = %s"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user