mirror of
https://github.com/wassname/catalyst.git
synced 2026-10-02 12:10:23 +08:00
MAINT: Use 1 as the first bitmask value instead of 0.
To prevent a possible future bug where values like SELL | STOP | LIMIT would accidentally match STOP | LIMIT.
This commit is contained in:
1 parent
1575867b40
commit
4b023a852a
1 file changed
+4
-4
@@ -23,10 +23,10 @@ from functools import partial
|
||||
from zipline.protocol import DATASOURCE_TYPE
|
||||
import zipline.utils.math_utils as zp_math
|
||||
|
||||
SELL = 0
|
||||
BUY = 1
|
||||
STOP = 1 << 1
|
||||
LIMIT = 1 << 2
|
||||
SELL = 1 << 0
|
||||
BUY = 1 << 1
|
||||
STOP = 1 << 2
|
||||
LIMIT = 1 << 3
|
||||
|
||||
|
||||
def check_order_triggers(order, event):
|
||||
|
||||
Reference in new issue
Block a user