mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-05 21:21:56 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user