if sys.argv[1] == 'b':
if last >= (entryPrice + CLOSE_RANGE):
print('Close!')
sys.exit()
elif last <= (entryPrice - STOP_RANGE):
market('sell', LOT)
print('Loss Cut!')
order = bitmex.cancel_order(closeId)
print('Cancel: ' + order['info']['ordType'] + ' ' + order['info']['side'] + ': ' +
str(order['info']['orderQty']) + ' @ ' + str(order['info']['price']) + ' / ' + order['id'])
sys.exit()
が、
Traceback (most recent call last):
File "./uichi.py", line 25, in <module>
if sys.argv[1] == 'b':
IndexError: list index out of range
と出てしまいます。
教えてください!
回答1件
あなたの回答
tips
プレビュー