Updates README example code to use window_length instead of days.

In a previous patch, the transform argument had been changed
from days to window_length.

The README example was thus not able to be run, updating algo
so that it runs against current versions of transforms.
This commit is contained in:
Eddie Hebert
2012-12-19 18:10:20 -05:00
parent c919e380f4
commit 204eae7274
+2 -2
View File
@@ -83,11 +83,11 @@ class DualMovingAverage(TradingAlgorithm):
# with a short window.
self.add_transform(MovingAverage, 'short_mavg', ['price'],
market_aware=True,
days=short_window)
window_length=short_window)
self.add_transform(MovingAverage, 'long_mavg', ['price'],
market_aware=True,
days=long_window)
window_length=long_window)
# To keep track of whether we invested in the stock or not
self.invested = False