QuantConnect / QuantConnect/Lean
Unexpected Order Event Handling
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
Settings.UnexpectedOrderEventsHandling
= UnexpectedOrder.Ignore # Drop without matching order id.
= UnexpectedOrder.Merge # Add asset; accept the fill.
= UnexpectedOrder.Shutdown # Default
void OnUnexpectedOrderEvent(UnexpectedOrderEvent event);
It could allow users to manually enter with intelligent risk control exits. Or reusing the same UUID in FIX networks.
Actual Behavior
Always shuts down strategy.
Potential Solution
In the fill handling add the additional options above and act based on the setting of the strategy.
Reproducing the Problem
Placing a trade in the OANDA cloud terminal while running a live Oanda algorithm
Checklist
- I have 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
Start by locating the fill-handling code and the strategy settings related to UnexpectedOrderEventsHandling. Trace how an unexpected OANDA order event currently causes shutdown, then review how the proposed Ignore, Merge, and Shutdown options and OnUnexpectedOrderEvent callback should fit together. Done means the selected behavior is applied consistently and the unexpected-order scenarios are covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- fintech-quant
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100