QuantConnect / QuantConnect/Lean

Create MarketIfTouched Orders

Open
#1,021 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

depth feature live-trading order-types
Dominant language
C#
Stars
21.7k
Forks
5.3k
Avg merge
2d 22h
Merged PRs (30d)
34

Description

IB has market/limit if touched orders. Why I would like to have them added in Lean/QC is

  • I want to catch small mean reversion movements and avoid the typical fall through in price on a micro scale that happens with limit orders
  • Passive limit orders can be targeted by predatory HFT algorithms that use these orders as insurance (they can enter betting that price movement will reverse just before limit, while being able to safely exit at limit). Market if touched keeps order hidden until triggered and has lower latency than manually issuing market order

I don't think there needs to be shortcut methods in QCAlgorithm for these since they are more fringe than existing order types. It's sufficient if I can submit new order type class instances or set a "TouchPrice" property or similar.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Lean's existing order types and order-submission interfaces to determine where a market-if-touched order and its TouchPrice would fit. Done means the new order type can be submitted as a class instance, remains hidden until its touch condition, and provides the requested market execution behavior without requiring QCAlgorithm shortcut methods.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.