mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-09 13:23:25 +08:00
PERF: using comparison operation instead of tolerant_equals
This commit is contained in:
@@ -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