Hi there,
I found different code examples where an orderId is returned as a new Order object is created. This works perfect for what I need, but at the same time, I need to be able to reference a certain Id when selling. For example, if I opened an order with Id 1 and quantity 50, I want to be able to sell just by providing the Id, and letting the code to figure out the associated quantity. Is this possible? Any example is appreciated.
Thanks in advance!
Jared Broad
Transactions.Update(order);
I have attached the algorithm to demonstrate this here, and made a new algorithm in the QC University called "Creating and Updating Limit Orders". The example sets the price to 95% of MSFT's price every 20 days, until the order is hit. Once we finish the open sourcing project it will be much easier to understand. Hopefully before the end of this week at the rate we're going!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.
Angelina Mansilla
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!