From 8e1cdac77de8dde04ccf9f1d3a53553d4822ce0f Mon Sep 17 00:00:00 2001 From: Jeremi Joslin Date: Sun, 21 Jul 2013 17:46:42 +0200 Subject: [PATCH] BUG: Fix talib sample; parameter for window length is called timeperiod --- zipline/examples/dual_ema_talib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zipline/examples/dual_ema_talib.py b/zipline/examples/dual_ema_talib.py index a8846718..4f09a73b 100644 --- a/zipline/examples/dual_ema_talib.py +++ b/zipline/examples/dual_ema_talib.py @@ -38,8 +38,8 @@ class DualEMATaLib(TradingAlgorithm): def initialize(self, short_window=20, long_window=40): # Add 2 mavg transforms, one with a long window, one # with a short window. - self.short_ema_trans = EMA(window_length=short_window) - self.long_ema_trans = EMA(window_length=long_window) + self.short_ema_trans = EMA(timeperiod=short_window) + self.long_ema_trans = EMA(timeperiod=long_window) # To keep track of whether we invested in the stock or not self.invested = False