robinhood-options-mobile

Multi-Leg Order Templates & Spread Builder

Overview

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.


Supported Strategies & Templates

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

Core Capabilities

1. Real-Time Net Debit / Credit Calculation

2. Comprehensive Risk & Reward Metrics

3. Interactive Leg Configuration Card

Each leg within the builder provides:

4. Brokerage Execution Integration (IBrokerageService)

5. Access Points


Technical Architecture

┌────────────────────────────────────────────────────────┐
│               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 │ │                               │
└───────────────────────────────┘ └───────────────────────────────┘

Testing & Quality Assurance

Unit and widget tests located in test/multi_leg_spread_builder_test.dart: