This commit is contained in:
Trent Nelson 2018-06-14 20:56:41 -07:00
commit fa4f783288

View file

@ -44,21 +44,28 @@ def start_sell():
if 'strategy says sell now' in message.get_subject():
print('sell signal found')
print(message.get_subject())
trade = "sell"
def get_signal():
try:
if 'strategy says sell now' in message.get_subject():
print('sell signal found')
print(message.get_subject())
return "sell"
elif 'strategy says buy now' in message.get_subject():
print('buy signal found')
print(message.get_subject())
trade = "buy"
elif 'strategy says buy now' in message.get_subject():
print('buy signal found')
print(message.get_subject())
return "buy"
except:
print('failed')
else:
print('failed')
signal = get_signal()
if signal == "buy":
start_buy()
if signal == "sell"
start_sell()
start_buy()
#start_sell()
#start_sell()