This website uses cookies and other technology to provide you a more personalized
experience. By
continuing the view of our web-pages you accept the terms of using these files. If you
don't
want your personal data to be processed, please, leave this site.
Learn More →
Examples of errors detected by the V3075 diagnostic
V3075. The operation is executed 2 or more times in succession.
QuantConnect Lean
V3075 The '-' operation is executed 2 or more times in succession. Consider inspecting the '- -shares' expression. OpeningBreakoutAlgorithm.cs 328
private void ScanForEntrance()
{
var shares = (int)(allowedDollarLoss/expectedCaptureRange);
....
if (ShouldEnterLong)
{
MarketTicket = MarketOrder(symbol, shares);
....
}
else if (ShouldEnterShort)
{
MarketTicket = MarketOrder(symbol, - -shares); // <=
....
StopLossTicket = StopMarketOrder(symbol, -shares, stopPrice);
....
}
....
}