BUG: Fix talib sample; parameter for window length is called timeperiod

This commit is contained in:
Jeremi Joslin
2013-07-21 17:46:42 +02:00
committed by Eddie Hebert
parent 2314e8a281
commit 8e1cdac77d
+2 -2
View File
@@ -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