We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The limit price of combo orders obeys the minimum price variation.
The limit price is not rounded down.
Add rounding rule to RoundOrderPrices method.
RoundOrderPrices
private List<Leg> _legs; public override void Initialize() { SetStartDate(2013, 10, 07); var index = AddIndex("SPX").Symbol; Symbol getSymbol(decimal strike) => QuantConnect.Symbol.CreateOption(index, "SPXW", Market.USA, OptionStyle.European, OptionRight.Put, strike, DateTime.Today); _legs = new() { Leg.Create(getSymbol(5150), 1), Leg.Create(getSymbol(5200), -1) }; foreach(var leg in _legs) { AddIndexOptionContract(leg.Symbol).SetMarketPrice(new Tick(DateTime.UtcNow, leg.Symbol, 1.35m, 1.30m, 1.40m)); } } public override void OnWarmupFinished() { if (_legs.Any(x=> !Portfolio[x.Symbol].Invested)) { ComboLimitOrder(_legs, 1, -0.123456789m); // <--- } }
master
The text was updated successfully, but these errors were encountered:
jhonabreul
Successfully merging a pull request may close this issue.
Expected Behavior
The limit price of combo orders obeys the minimum price variation.
Actual Behavior
The limit price is not rounded down.
Potential Solution
Add rounding rule to
RoundOrderPrices
method.Reproducing the Problem
Checklist
master
branchThe text was updated successfully, but these errors were encountered: