mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-25 13:10:33 +08:00
ENH: Implemented AUTO_INITIALIZE feature.
Created a new flag in TradingAlgorithm that enables subclasses to decide if they want to handle setting self.initialized = True. Before it was the responsibility of an overriding subclass to set initalized = True. This was causing problems because it's easy to forget this. Now it is the responsibility of TradingAlgorithm unless explicity stated otherwise.
This commit is contained in:
@@ -608,7 +608,7 @@ def handle_data(context, data):
|
||||
def test_order_in_init(self):
|
||||
"""
|
||||
Test that calling order in initialize
|
||||
will return an error
|
||||
will raise an error.
|
||||
"""
|
||||
with self.assertRaises(OrderDuringInitialize):
|
||||
test_algo = TradingAlgorithm(
|
||||
|
||||
Reference in New Issue
Block a user