Hi,
Quick question: When exactly do manually placed trades (for example, through IB TWS) kill the algo? Specifically, does the algo stop when the trade is placed or when the trade is executed? For example, if I stop the algo, manually place a stop loss order through TWS, and then restart the algo, will the later execution of the stop loss order kill the algo?
(I have already looked through this article and these old threads and I don't see a clear answer.)
Thank you!
David E
I ran into this issue. The way that I fixed it is that you need to make sure that your algorithm recognizes the equity that you’re purchasing manually. In addition, you can start a new user through interactive brokers so that you can login with a different user ID so the login doesn’t boot you off. If you purchase an equity, it has to be an equity that your algorithm recognizes.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Nightrader
I did some testing the other day and found that the execution of an existing (manual) order does not stop the algo, but placing a new (manual) order did stop it. And thank you, David, I'll keep that in mind about the algo recognizing the equity.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
David E
Yeah maybe I haven’t ran into the issue you’re having. What I was describing is that if I didn’t have “add equity“ in the initialize section and logged into IB and placed a trade with that equity then the algo would shut down because it recognized that it owned an equity that it didn’t have added to initialize.
do you have the equity added and it’s still closing down on you? And it’s only closing if you manually adjust a tray that was existing when the algorithm was opened? Are you doing the manual trade through interactive brokers itself or are you doing it through the algorithm?
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Nightrader
I actually haven't had an issue yet - my original question was to better understand how manual trades (through IB TWS) affect the algo. I'm still doing testing & debugging, but I think that my plan for now is to just shut the algo off to place manual trades in the account (if I use TWS) and then turn the algo back on again while making sure the security is initialized.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!