Skip to content

Stack handler and manual trade selectively trading. #687

Answered by rorymac
rorymac asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks to the hive mind, the problem was indeed that the system as written is geared to GMT, as it should be given that the BDFL is resident in that time zone.

Thanks to Todd and Meldinman for pointing out the time issue, and thanks to Rob for showing me how to run a trace and where.

Here is the hack that fixed the time issue:

def get_time_difference(time_zone_id: str) -> int:
    # Doesn't deal with DST. We will be conservative and only trade 1 hour
    # after and 1 hour before
    # confusingly, IB seem to have changed their time zone codes in 2020

    time_diff_dict = {
        "CST (Central Standard Time)": 6,
        "MET (Middle Europe Time)": -1,
        "EST (Eastern Standard Ti…

Replies: 5 comments 16 replies

Comment options

You must be logged in to vote
2 replies
@rorymac
Comment options

@meldinman
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@meldinman
Comment options

@rorymac
Comment options

@meldinman
Comment options

@rorymac
Comment options

Answer selected by rorymac
Comment options

You must be logged in to vote
3 replies
@robcarver17
Comment options

@oldlore
Comment options

@rorymac
Comment options

Comment options

You must be logged in to vote
7 replies
@ncarey
Comment options

@tgibson11
Comment options

@ncarey
Comment options

@tgibson11
Comment options

@oldlore
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants