mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-05 03:19:03 +08:00
TST: Update talib example for compatibility with multiple sids.
To support mulitple sids the TALib transforms now return a dict, instead of a float. Accordingly, the TALib example script now needs to index into the transform result.
This commit is contained in:
@@ -63,8 +63,8 @@ class DualEMATaLib(TradingAlgorithm):
|
||||
self.sell = True
|
||||
|
||||
self.record(AAPL=data['AAPL'].price,
|
||||
short_ema=self.short_ema,
|
||||
long_ema=self.long_ema,
|
||||
short_ema=self.short_ema['AAPL'],
|
||||
long_ema=self.long_ema['AAPL'],
|
||||
buy=self.buy,
|
||||
sell=self.sell)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user