I want to implement below strategy for "SPY":

Buy @9:40am if  'spy' price >  maximum of  previous two days' high.

How can refer daily data in minute data mode? 

 

Thanks.

 

Michael