I have this simple program that buys APPL using a Stop buy order at the high of the previous day each day when the market opens. One minute before the market closes, it is canceled if the buy order hasn't been filled. Both of those parts are working, as when I look at the buy order logs, I notice that the program does put the buy order at the right price and cancels at the right time. My main issue is that none of the Stop Market orders are getting filled even when the price breaches the stop price. For example, on 1/13/21, the program placed a buy order for AAPL at a Stop price of 129.74, which is correct. The high for 1/13/21 was 131.45, meaning the order should have been filled. However, the program canceled the order one minute before the market closed. Another example was on 4/7/21 when the program placed the stop buy demand for AAPL at 127.17, and the high of that day was 127.92, so the order should have been filled, but it ended up being canceled as well. Could someone please help me resolve this issue?
Louis Szeto
Hi John
Please refer to a similar issue in this reply.
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.
John M
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!