Add iron condor trade scheduler script
This commit is contained in:
parent
b13e5d1525
commit
0fe6181e7c
20
iron_condor_scheduler.py
Normal file
20
iron_condor_scheduler.py
Normal file
@ -0,0 +1,20 @@
|
||||
import schedule
|
||||
import time
|
||||
|
||||
from iron_condor import enter_iron_condor
|
||||
from multiprocessing import Process
|
||||
|
||||
# TODO: Look up entry times from database.
|
||||
entry_times = []
|
||||
|
||||
def enter_trade():
|
||||
job_process = Process(target = enter_iron_condor)
|
||||
job_process.start()
|
||||
|
||||
if __name__ == '__main__':
|
||||
for entry_time in entry_times:
|
||||
schedule.every().day.at(entry_time, 'America/Los_Angeles').do(enter_trade)
|
||||
|
||||
while True:
|
||||
schedule.run_pending()
|
||||
time.sleep(1)
|
Loading…
Reference in New Issue
Block a user