As I am learning the platform, I notice that if I set a GTC limit order today, the order may not get filled in backtesting even if the price low for tomorrow is well below the limit.
For example, I set a GTC limit order for SPY end of the day on Apr 5h with a limit @406. The low on Apr 6th is 405.4 and close on Apr 6th is 406.12. In this case, I didn't get a fill on Apr 6th.
Question: Is this because I only subscribe to daily data and the algorithm only checks close price? If so, is there any setting I can use to let the order filled if the low is below the limit?
Grateful Trading
Hi Ximin,
An attached backtest is ideal, if possible, so we can dive in and help. Are you able to do that?
Otherwise, I would check to make sure the order is actually submitted and active during the following day. As I understand it, a submitted GTC limit order is independent of algorithm updates. It's treated as if submitted to the brokerage, so will fill when the price gets to limit price.
Xinmin Cai
backtesting attached. Logs are below:
2021-04-05 00:00:00 : Launching analysis for 15339d85396f674cf6bf86154f13413d with LEAN Engine v2.5.0.0.11504 2021-04-06 00:00:00 : 2021-04-06 00:00:00: Open:403.49, Close:406.36, High:406.94, Low:403.38 2021-04-07 00:00:00 : 2021-04-07 00:00:00: Open:405.83, Close:406.12, High:407.23, Low:405.41 2021-04-08 00:00:00 : 2021-04-08 00:00:00: Open:405.95, Close:406.59, High:406.96, Low:405.45 2021-04-08 00:00:00 : Algorithm Id:(15339d85396f674cf6bf86154f13413d) completed in 0.51 seconds at 0k data points per second. Processing total of 32 data points.
Xinmin Cai
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!