Skip to content

Commit 109e6d8

Browse files
committed
Fix timing issue when checking market close
1 parent 12727c2 commit 109e6d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/overnight_hold.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def run_live(api):
191191
# Wait to buy
192192
time_until_close = clock.next_close - clock.timestamp
193193
# We'll buy our shares a couple minutes before market close.
194-
if time_until_close.seconds <= 9120:
194+
if time_until_close.seconds <= 120:
195195
print('Buying positions...')
196196
portfolio_cash = float(api.get_account().cash)
197197
ratings = get_ratings(

0 commit comments

Comments
 (0)