Back

Live paper trading with IB TWS API/LEAN

I would like to know whether it is possible to run LEAN with a direct connection to the TWS API. Does it require implementation of own code or is it supported out of the box?? Does it need other helper software like IBcontroller or ironpython? Currently I pulled lean from GIT in VS2015 not sure if I need other stuff for my proof of concept.

What I would like to see is a running latest TWS (or IB Gateway), and that when I start the LEAN algo locally, the LEAN system will send trades to TWS live (paper trade for the moment), which you can follow in TWS. For example with live data from TWS or from the QuantConnect server (or maybe even both at the same time, as backup or something?!)

Every help and guidance is much appreciated! I am trying to set this up as a proof of concept. I very much like the extensive LEAN library. Only not sure about running everything on QC servers. I read that tick data from QC connection services is also better than IB which has 300 ms updated tick data instead of real ticks. Also I would very much like to stay cross platform, and to be able to switch fast to a different OS or QC server. Again, any help and references are much appreciated.

Update Backtest








Welcome Ge Heim! Its definitely possible. Please post any questions about the LEAN engine to the Google Groups - https://groups.google.com/forum/#!forum/lean-engine

Its a little bit of work to get it going - you need to set IB as the DataQueueHandler, and then specify IB as your brokerage and insert your login credentials into your config file. We use a program called "IBController" which automates the login process for you. The run-ib-controller script launches IB for you in windows or linux.

0

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.


relaetd/ unrelated question:

I havent been able to go live with IB paper account in about a week. I keep seeing this:

"This account type are under maintenance, please try again later

To use IB with QuantConnect you must set partial two-factor authentication. This is done from your IB Account Management Portal -> Security -> SLS Opt Out page. Your account details are not saved on QuantConnect. Currently you can only hold Equity and Forex assets (futures and options not supported)."

However, IB paper accounts do not have the SLS opt Out page under the security tab. Are the paper accounts really been under maintenance for a week now!?!?! 

0

Hi Tim; sadly yes IB paper accounts have been under maintenance a week -- its been a brutal week too. We are migrating everything to a live colo environment in NY7 -- colocated right next to the major exchanges for a more stable data and trading environment. We had a break through last night though so it should be finished by later tonight or tomorrow. Then all new deployments will go to the colo server :) I know its not acceptable so I'm happy to refund your subscription for the month - just send through a request to support and we'll process it for you.

0

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.


We made a status page so you can monitor the cloud for updates. I'll post to this thread when its back online.

0

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.


Update Backtest





0

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.


Loading...

This discussion is closed