-
Notifications
You must be signed in to change notification settings - Fork 1
/
RunFile.py
27 lines (26 loc) · 898 Bytes
/
RunFile.py
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
import os
import coloredlogs, logging
global logger
os.environ['TF_MIN_GPU_MULTIPROCESSOR_COUNT'] = '2'
logger = logging.getLogger(__name__)
coloredlogs.install(level='DEBUG')
from datetime import datetime
global current_time
now = datetime.now()
current_time = now.strftime("%H")
print("Current Time =", str(current_time), "Hour")
now = datetime.now()
current_time = now.strftime("%H")
if 6 <= int(current_time) < 13:
print("Current Time =", current_time, "Hour")
logger.info('Trading Now...')
current_time = now.strftime("%H")
os.system('python tradeAI.py trade')
elif 13 <= int(current_time) <14 or 0<= int(current_time) < 6:
now = datetime.now()
current_time = now.strftime("%H")
print("Current Time =", current_time, "Hour")
logger.info('Training Now...')
now = datetime.now()
current_time = now.strftime("%H")
os.system('python tradeAI.py train')