I keep getting errors that I don't have enough free margin for a trade when I have 2x or more free margin available per interactive brokers. I'm long equities and long in options and trying to go long on futures. The algo is trying to place a futures order and the calculation for the initial margin amount seems correct for he futures contract but the free margin calculation is totally wrong. How can I disable this and force the algo to send the order?
Live Handled Error: Order Error: ids: [51], Insufficient buying power to complete orders (Value:[263710]), Reason: Id: 51, Initial Margin: 18482.15, Free Margin: 14501.492494.
Louis Szeto
Hi All
You can take this sample algorithm as reference, to allow infinite buying power.
Best
Louis
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
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!