teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

間違い

2018/03/15 08:59

投稿

uuuiii
uuuiii

スコア11

title CHANGED
File without changes
body CHANGED
@@ -1,7 +1,14 @@
1
- Traceback (most recent call last):
2
- File "./uichi.py", line 25, in <module>
3
- if sys.argv[1] == 'b':
1
+ if sys.argv[1] == 'b':
2
+ if last >= (entryPrice + CLOSE_RANGE):
3
+ print('Close!')
4
+ sys.exit()
5
+ elif last <= (entryPrice - STOP_RANGE):
6
+ market('sell', LOT)
7
+ print('Loss Cut!')
4
- IndexError: list index out of range
8
+ order = bitmex.cancel_order(closeId)
9
+ print('Cancel: ' + order['info']['ordType'] + ' ' + order['info']['side'] + ': ' +
10
+ str(order['info']['orderQty']) + ' @ ' + str(order['info']['price']) + ' / ' + order['id'])
11
+ sys.exit()
5
12
 
6
13
  が、
7
14