Hello all,
I'm experiencing below pasted error in my back test. By searching on the forum I've found, that I should have been using IsMarketOpen, but even using this condition does not prevent the error to be raised. What's the reason for his error? How to handle this correctly? Any idea appreciated.
Backtest Handled Error: OrderID: 1964 Warning - Code: NotSupported - The OandaBrokerageModel does not support MarketOnOpen order type.
if self.IsMarketOpen("WTICOUSD") and self.IsMarketOpen("USDCAD"):
self.MarketOrder("USDCAD", -125, asynchronous=True)
self.MarketOrder("WTICOUSD", 1, asynchronous=True)
Louis Szeto
Hi Tomas
A MarketOnOpenOrder is an order that submitted to the brokerage that execute at the next market opening. It could be submitted regardless of the market opening status. However, OandaBrokerageModel does not support that. For details of order type support from the Oanda brokerage, please refer to this section of the docs.
The code seems to be correct to me. Probably you might need to rebuild the project. If that doesn't work, please upload a simple version of the backtest here for debugging.Â
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.
Tomas Rampas
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!