http://drive.google.com/file/d/1qOIQQPt9Be86bnJnuLAzoU7WsLhdxV3Z/view?usp=sharing
def shape(data):
if [data['Open'] < data['Close']]:
if [data['Open'] > data['Low']]:
if [data['High'] > data['Close']]:
a = 1
return a
if [data['High'] == data['Open']]:
b = 10
return b
if [data['Low'] == data['Open']]:
if [data['Close'] > data['Open']]:
c=3
return c
if [data['High'] == data['Close']]:
d = 7
return d
if [data['Open'] > data['Close']]:
if [data['Close'] == data['Low']]:
if [data['High'] == data['Open']]:
e = 4
return e
if [data['High'] > data['Open']]:
f = 6
return f
if [data['Close'] > data['Low']]:
if [data['High'] == data['Open']]:
g= 11
return g
if [data['High'] > data['Open']]:
h = 13
return h
if [data['Open'] == data['Close']]:
if [data['Open'] == data['Low']]:
if data['High'] > data['Close']:
i = 5
return i
if [data['High'] == data['Close']]:
if [data['Low'] < data['Open']]:
j = 8
return j
if [data['Close'] > data['Low']]:
if [data['Open'] < data['High']]:
k = 12
return k
if [data['Open'] == data['Close']]:
if [data['High'] == data['Low']]:
if [data['High'] > data['High'].shift(-1)]:
l = 2
return l
if [data['Low'] < data['Low'].shift(-1)]:
m = 9
return m
dd['Shape'] = shape(dd)