Hi,

How would I go about getting  past minute or second data for certian stocks? I keep getting errors saying minute is not defined and I was also wondering how would I define that?

import numpy as np
from datetime import datetime
import pandas as pd
import math


class VolTrading(QCAlgorithm):

def __init__(self):
self.previous = None
self.position = None




def Initialize(self):

self.SetStartDate(2007,1,1) #Set Start Date
#self.SetEndDate(2018,10,29) #Set End Date
self.SetCash(10000) #Set Strategy Cash
self.AddSecurity(SecurityType.Equity, "x", Resolution.Minute)
self.AddSecurity(SecurityType.Equity, "y", Resolution.Minute)
self.SetWarmUp(440)
self.History("x","y",-1, Minute)





def OnData(self, data):


self.xPercent = math.log((self.Identity(x").Current.Value)/
(History(x",-1, Resolution.Minute)))
self.yPercent = math.log((self.Identity("y").Current.Value)/
(History("y",-1, Resolution.Minute)))