I cannot attach a backtest at this time because the algorithm's current setup is proprietary. If needed I'll make a dummy demo and try to reproduce the results. I have a local Lean running and my strategy is written in Python. I'm trying to leverage double barrier and triple barrier methods in the execution model -- Once I place market order and it is filled, immediately set a limit, stop-loss and sell after some timelapse. I'm trying to make my organization utilize the algorithmic framework so I'm building this logic in the execution model. I'm debugging python locally and finding that in the OnOrderEvent method I'm getting orders with OrderType == 4 for MarketOnOpen orders. I never use a MarketOnOpen order. When I step out of the function using the VScode debbuger it comes back to temptick = algorithm.MarketOrder(symbol, quantity). It returns True for temptick.OrderType == 4. Is this a bug in the most recent docker container?
Derek Melchin
Hi Trevor,
We were able to reproduce this error with an older version of LEAN. With the latest version, this is no longer an issue.
Best,
Derek Melchin
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.
Trevor Woods Richardson
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!