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:
Delaney Granizo-Mackenzie
2014-07-08 14:03:53 -04:00
parent 3521a11ed4
commit 9b01d78f5d
3 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -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(