Skip to content

Advanced Insight Management

AQE supports child insights directly on the core insight model. A parent insight can attach one or more child insights and preserve that relationship through the runtime and the snapshot data model.

parent.add_child_insight(child, None, ctx);

In the current API, the second argument identifies an order fragment. Use None for an ordinary child insight. Fragments created to respect a broker’s maximum order size carry is_split_insight; distinguish these from independent DCA levels.

That gives you two important capabilities:

  • lineage: child insights remain connected to the original parent through parent_id
  • deferred submission: AQE can queue child insights and submit them at the right time in the runtime loop

Typical use cases include staged entries, follow-up signals derived from a parent fill, and multi-step trade plans that need a linked inspection trail.

The insight stores the configuration you define, but the broker owns the actual execution legs:

  • take-profit legs
  • stop-loss legs
  • trailing-stop legs

For example, a trailing stop is defined on the insight as a float gap, while the broker creates and manages the actual trailing stop leg during execution.

Insights can record partial close results over time. That matters for:

  • scale-out strategies
  • multi-target exits
  • accurate inspection in AQS and backtest review

If a strategy uses more than one take-profit level, AQE can close part of the quantity while leaving the remaining position open.

Child insights and partial closes solve different problems:

  • partial closes keep one insight open while reducing size over time
  • child insights create separate linked insights with their own lifecycle