Back

I keep getting this error for my MovingAveragesScript

def Initialize(self):
'''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.'''

self.SetStartDate(2017, 1, 1) #Set Start Date
self.SetEndDate(datetime.now() - timedelta(1)) #Set End Date
self.SetCash(10000) #Set Strategy Cash
# Find more symbols here: http://quantconnect.com/data
self.AddEquity(stock)
self.Securities[stock].FeeModel = ConstantFeeTransactionModel(1)

The code is above and it is for a BasicMovingAverages Script. It keeps getting an error. I want it to put the end time as current time I'm trying to bring this live. 

Update Backtest








so everything is there but resolution not?

that is what the error tries to tell me?

def Initialize(self):
self.SetStartDate(2005, 2, 25)
self. SetEndDate(2005, 2, 28)
self.SetCash(100000)
self.SetBenchmark(lambda x: 0)

self.symbol = self.AddEquity("AAPL", Resolution.Hour).Symbol
0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed