Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peer closed connection. clientId 3 already in use? #84

Open
kinkocho opened this issue Jul 31, 2023 · 0 comments
Open

Peer closed connection. clientId 3 already in use? #84

kinkocho opened this issue Jul 31, 2023 · 0 comments

Comments

@kinkocho
Copy link

Hello,
I tried to use feed='ib' for testing macd strategy example provided and every time I try to connect to TWS this happens:

runfile.py

from autotrader import AutoTrader

# Create AutoTrader instance, configure it, and run backtest
at = AutoTrader()
keys_config = {
    "IB": {
        "host": "127.0.0.1",
        "clientID": 7497,
        "clientID": 0
    }
}
at.configure(global_config=keys_config, verbosity=1, show_plot=True, feed='ib')
at.add_strategy('macd')
at.backtest(start='1/1/2021', end='1/5/2022')
at.virtual_account_config(initial_balance=1000, leverage=30)
at.run()

output:
Peer closed connection. clientId 3 already in use?
API connection failed: TimeoutError()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant