Obviously trying to learn. Simple buy when high of yesterday > high of today
def initialize(context):
context.aapl = sid(24)
open_px=data[context.stock].open_price
close_px=data[context.stock].close_price
hi=data[context.stock].high
lo=data[context.stock].low
price_history = history(bar_count=3, frequency='1d', field='price')
for s in data:
if hi.ix[-1] > hi.ix[-2]:
orders(s,1)