Fixes custom data algos to reflect changes from previous commit

This commit is contained in:
AlexCatarino
2018-02-09 23:21:46 +00:00
parent cff1243b86
commit 64a9929fa6
4 changed files with 7 additions and 6 deletions
+3 -2
View File
@@ -14,11 +14,13 @@
from clr import AddReference
AddReference("System")
AddReference("QuantConnect.Algorithm")
AddReference("QuantConnect.Indicators")
AddReference("QuantConnect.Common")
from System import *
from QuantConnect import *
from QuantConnect.Algorithm import *
from QuantConnect.Indicators import *
from QuantConnect.Data import SubscriptionDataSource
from QuantConnect.Python import PythonData
from datetime import date, timedelta, datetime
@@ -83,7 +85,6 @@ class BubbleAlgorithm(QCAlgorithm):
try:
# Bubble territory
if self._currCape > 20 and self._newLow == False:
self.Log(" Time " + str(self.Time))
for stock in self._symbols:
# Order stock based on MACD
# During market hours, stock is trading, and sufficient cash
@@ -120,7 +121,7 @@ class BubbleAlgorithm(QCAlgorithm):
# Do nothing
return None
if "CAPE" not in data: return
if not data.ContainsKey("CAPE"): return
self._newLow = False
# Adds first four Cape Ratios to array c
self._currCape = data["CAPE"].Cape