mirror of
https://github.com/wassname/catalyst.git
synced 2026-10-29 13:00:42 +08:00
PERF: using comparison operation instead of tolerant_equals
This commit is contained in:
1 parent
923d3e4cbc
commit
395ce67c53
1 file changed
+4
-4
@@ -191,12 +191,12 @@ class Blotter(object):
|
||||
if trade_event.type != zp.DATASOURCE_TYPE.TRADE:
|
||||
return
|
||||
|
||||
if zp_math.tolerant_equals(trade_event.volume, 0):
|
||||
# there are zero volume trade_events bc some stocks trade
|
||||
# less frequently than once per minute.
|
||||
if trade_event.sid not in self.open_orders:
|
||||
return
|
||||
|
||||
if trade_event.sid not in self.open_orders:
|
||||
if trade_event.volume < 1:
|
||||
# there are zero volume trade_events bc some stocks trade
|
||||
# less frequently than once per minute.
|
||||
return
|
||||
|
||||
orders = self.open_orders[trade_event.sid]
|
||||
|
||||
Reference in new issue
Block a user