Retrieve entry times from environment variables
This commit is contained in:
parent
afd33102bd
commit
7119af4e34
@ -1,7 +1,6 @@
|
|||||||
import schedule
|
import schedule
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from backtesting import best_entry_times
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from ibkr import Client
|
from ibkr import Client
|
||||||
@ -33,8 +32,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
now = datetime.now(timezone(eastern_timezone))
|
now = datetime.now(timezone(eastern_timezone))
|
||||||
|
|
||||||
entry_times = sorted(best_entry_times())
|
entry_times = getenv('ENTRY_TIMES').split(',')
|
||||||
print(entry_times)
|
|
||||||
for entry_time in entry_times:
|
for entry_time in entry_times:
|
||||||
schedule_time = datetime.strptime(entry_time, '%H:%M:%S').replace(
|
schedule_time = datetime.strptime(entry_time, '%H:%M:%S').replace(
|
||||||
year = now.year,
|
year = now.year,
|
||||||
|
Loading…
Reference in New Issue
Block a user