-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
55 lines (44 loc) · 1.52 KB
/
main.py
File metadata and controls
55 lines (44 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from picture_generator import draw_pnl_picture
if __name__ == '__main__':
print('What coin did you trade?')
coin = input()
print('Wich direction did you trade? Long/Short?')
while True:
try:
d = input()
if 'ong' in d or 'l' in d or 'L' in d:
direction = 'long'
break
if 'ort' in d or 's' in d or 'S' in d:
direction = 'short'
break
except:
print("Can't identify direction... Please tra again:")
print('What was your entry price?')
while True:
try:
entry_price = float(input().replace(',', '.'))
break
except:
print('Please enter a number :)')
print('What was your exit price?')
while True:
try:
exit_price = float(input().replace(',', '.'))
break
except:
print('Please enter a number :)')
print('What was your leverage?')
while True:
try:
leverage = int(input())
break
except:
print('Please enter a number :)')
profit = draw_pnl_picture(coin=coin,
direction=direction,
entry_price=entry_price,
exit_price=exit_price,
leverage=leverage)
if profit > 0:
print('Nice Trade! Share it in the Discord: https://discord.com/channels/938278313200328724/938278313686876247')