The Multi-Leg Order Templates & Spread Builder (MultiLegSpreadBuilderSheet, MultiLegMatrixOrderEntryWidget, and MultiLegOrderEntry) provides pre-configured structural order entry pads and an interactive spread builder for complex multi-leg options strategies across Schwab, Robinhood, and simulated paper accounts.
Traders can configure, inspect, and execute multi-leg orders with real-time net credit/debit calculation, dynamic breakeven points, max profit/loss risk metrics, and direct brokerage execution via IBrokerageService.placeMultiLegOptionsOrder.
The Spread Builder provides 1-tap template configurations:
| Strategy | Structure | Direction / Type | Risk Profile |
|---|---|---|---|
| Bull Call Spread | Buy lower Call + Sell higher Call | Net Debit | Defined Risk / Defined Profit |
| Bear Put Spread | Buy higher Put + Sell lower Put | Net Debit | Defined Risk / Defined Profit |
| Bull Put Spread | Sell higher Put + Buy lower Put | Net Credit | Defined Risk / Defined Profit |
| Bear Call Spread | Sell lower Call + Buy higher Call | Net Credit | Defined Risk / Defined Profit |
| Long Straddle | Buy ATM Call + Buy ATM Put | Net Debit | Defined Risk / Unlimited Profit |
| Short Straddle | Sell ATM Call + Sell ATM Put | Net Credit | Unlimited Risk / Defined Profit |
| Long Strangle | Buy OTM Put + Buy OTM Call | Net Debit | Defined Risk / Unlimited Profit |
| Short Strangle | Sell OTM Put + Sell OTM Call | Net Credit | Unlimited Risk / Defined Profit |
| Iron Condor | Long Put + Short Put + Short Call + Long Call | Net Credit | Defined Risk / Defined Profit |
| Call Calendar Spread | Sell front-month Call + Buy back-month Call | Net Debit | Time-decay / Volatility Defined Risk |
| Put Calendar Spread | Sell front-month Put + Buy back-month Put | Net Debit | Time-decay / Volatility Defined Risk |
| Custom Multi-Leg | User-defined custom legs (up to 4 legs) | Debit / Credit | Dynamic |
NET CREDIT or NET DEBIT.1 : 2.50) displayed prominently.Each leg within the builder provides:
IBrokerageService)MultiLegOrderLeg objects into brokerage-compatible leg payloads:
side, position_effect, option_id, ratio_quantity)instruction BUY_TO_OPEN / SELL_TO_OPEN, symbol, quantity)confirm-spread-order):
service.placeMultiLegOptionsOrder(user, account, ...).spread-builder-appbar-btn with icon Icons.layers_outlined) inside OptionChainWidget.MultiLegMatrixOrderEntryWidget) for desktop/tablet and power users.┌────────────────────────────────────────────────────────┐
│ MultiLegOrderEntry (Model) │
│ - Vertical, Straddle, Strangle, Condor, Calendar │
│ - Max Profit / Loss, Breakevens, Debit/Credit Math │
│ - toBrokerageLegs(), toJson(), fromJson() │
└──────────────────────────┬─────────────────────────────┘
│
┌─────────────────┴─────────────────┐
▼ ▼
┌───────────────────────────────┐ ┌───────────────────────────────┐
│ MultiLegSpreadBuilderSheet │ │ MultiLegMatrixOrderEntryWidget│
│ - Modal bottom sheet UI │ │ - Desktop matrix pad view │
│ - 1-tap template ChoiceChips │ │ - Real-time strike stepper │
│ - Risk/reward analytics card │ │ - Direct order execution │
│ - Brokerage submission modal │ │ │
└───────────────────────────────┘ └───────────────────────────────┘
Unit and widget tests located in test/multi_leg_spread_builder_test.dart: