—
hsopens = []

hscloses = []

hshighs = []

hshighslows = zip(opens,closes,highs,lows)

hsopens=[(opens[i-1] + closes[i-1])/2 for i, x in enumerate(opens) if i > 0]

hscloses=[(opens[i] + highs[i] + lows[i] + closes[i])/4 for i, x in enumerate(opens) if i > 0]

hshighs = [max(a) for a in hshighslows]