self.MarketOrder(symbol, self.quantity[symbol], False, str(self.Securities[symbol].Price))
self.stopMarketTicket = self.StopMarketOrder(symbol, 0 - self.quantity[symbol], 0 * self.Securities[symbol].Close, str(self.Securities[symbol].Price))
In Backtesting, I am getting some orders filled with 0 USD on the FillPrice, selling the asset before the intended (It's selling at current price rather than 0 but still comes as a loss)
2020-11-09 08:00:00 : Time: 11/09/2020 13:00:00 OrderID: 638 EventID: 2 Symbol: BTCUSD Status: Filled Quantity: -0.00360321 FillQuantity: -0.00360321 FillPrice: 0 USD StopPrice: 0 OrderFee: 0.1122399915 USD
Doesn't matter which value I put on the StopPrice, It keeps getting triggred.Maybe there is abetter way to approach the problem. Thank you.
Derek Melchin
Hi Tiago,
The error is a result of incorrect BTC data. See the attached notebook for reference. We've created a Data Issue to have this resolved. Subscribe to our progress here.
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.
Tiago Silva
Hi Derek, thank you for the info.
I've worked around by placing the Stop order with initial value of -2, as it appears the Data is going to -1 in those cases.
I'm sure this could also be the issue on my new case:
https://www.quantconnect.com/forum/discussion/11153/trouble-backtesting-crypto-equity-goes-to-negative-on-cash-account/p1Incorrect Data is now causing my Portfolio to go -50.000, I'm concerned that this could also be happening live as I just had my Equity going from 2.500 to 1.5 Million then back to 2.500 a few days later (Paper tradding).
Should I be concerned that this would happen to the negative when live tradding? Thanks
Derek Melchin
Hi Taigo,
Yes, it's another data issue. Refer to this related thread.
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.
Tiago Silva
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!