QuantConnect / QuantConnect/Lean
Implement "Assigned by Not Used Buying Power" Restrictions
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 21.7k
- Forks
- 5.3k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 34
Description
Expected Behavior
A limit order is placed, the amounts of the currency being sold have been frozen/subtracted. If an order cancels, the amounts of that currency unfreeze.
Actual Behavior
The amount of the currency being sold does not freeze.
Potential Solution
Perhaps modify the order event handler logic in such a way, that it subtracts submitted funds when the order is submitted.
I have found a similar issue #2161 however that's for market orders. For Limit orders, I have the same issue.
What do you guys think, is it an issue at all? Or it's good behavior? I'm new to trading, I'm simply implementing my own GUI client and I see that it might not be the best in terms of UX.
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
masterbranch - I have confirmed that this is not a duplicate issue by searching issues
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the limit-order event handler logic described in the issue, comparing it with the related market-order issue #2161. Determine where submitted selling funds should be frozen and where cancellation should release them; done means limit orders reserve the sold currency and cancellations unfreeze it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- fintech-quant
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100