Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
mark 15 minute high of the day

I need to mark the 15 minute high of the day for all stocks that are in data. How might I do this? I tried many methods and no luck. Here is what I have atm...

Here is what I added to my code so far for this.

def initialize(context):

#Create a dataframe for the 15 minute high of the day.  
context.stocks_15h = pd.DataFrame([])

# Schedule times for mothods/functions to run.  
schedule_function(mark_15h, date_rules.every_day(), time_rules.market_open(minutes=15))

def mark_15h(context, data):

history_15h = history(15, "1m", "high")  
context.stocks_15h.append([max(history_15h)])  
3 responses

Thanks, but could you offer me some more help than that? I am confused how to implement it. I used this earlier with no luck. :/

I figured it out.