I am trying to make a price variable that assigns the close on a hourly chart of the last bar of the securities in the qtradableus() function. But i keep getting errors.
I am trying to make a algo that will trade all of what is available. or up to the max limit i am allowed to do. Do i need to make a array or something? I am new to this so I have been self teaching. I manage to debug all the other errors and this is the only issue i have left.
I want it to just go through a security in the universe check for my parameters, if it meets them put the trade then go to the next one. i have my parameters working just having trouble with getting price.
def make_pipeline():
data = QTradableStocksUS()
price_history = data.history(100, frequency='1h', field='price')
price = price_history( 'close', '1h')