Back

Paper trading using LEAN and IB - lag?

Hi everyone,

I've set up a paper trading account with Interactive Brokers and would like to paper trade using LEAN. I have invested in some holdings in this paper trading account. I ran a "strategy" that simply logs a message to the terminal (I'm on Linux) if my portfolio is invested, and the message logged as it should. To me that indicates that I've set up all the configs properly and am able to connect to my IB account properly.

This is my question - I then tried to simply purchase SPY, and made sure to log a message that the order went through. It did, at least according to the terminal. However when I exit the terminal and close IB Gateway and log into Trader Workstation, I see no indiciation that the trade actually went through, as I don't see SPY in my holdings.

Is there any documentation around that indicates there will be a lag between what occurs in the LEAN simulation and what shows up in Trader Workstation?

Thanks!

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.


Actually taking a look at it now, I don't think I've set up the configs properly - is there any documentation on this? I have searched the forums and haven't found anything yet unfortunately.

0

Hi Serena,

I recommend following the instructions from this thread. We just need to select the live-interactive environment and provide IB account information in the configuration file.

Best,
Derek Melchin

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.


Hi Derek, thanks for your reply! Turns out I did have the correct configs (it was great to double check using the links you provided). Ultimately my issue was solved by this error message:

"To allow this and similar subsequent actions, please uncheck the 'Read-Only mode API' checkbox under Settings/API in the Global Configuration."

So once I unchecked that box in the settings it worked!

0

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