Trade Multi Leg ThinkOrSwim
Places multi-leg option trades (spreads, straddles, iron condors, etc.) through TD Ameritrade/ThinkOrSwim. Supports up to 4 legs.
Prerequisites
- Active TD Ameritrade/Schwab brokerage account
- API connection configured in MarketXLS
- Options trading approval level for the strategy
Parameters
| Parameter | Required | Description |
|---|---|---|
| OrderType | Yes | MARKET, LIMIT, NET_DEBIT, NET_CREDIT |
| Price | Yes | Net price for spread |
| SymbolOption1-4 | Leg 1 req | TDA option symbols |
| Quantity1-4 | Leg 1 req | Contracts per leg |
| OrderSide1-4 | Leg 1 req | BUY_TO_OPEN, SELL_TO_OPEN, etc. |
TDA Option Symbol Format
TDA uses format: SYMBOL_MMDDYYCP + STRIKE
- Example: AAPL_011924C180 (AAPL Jan 19 2024 Call $180)
WARNING
This function places REAL trades. Always verify parameters before executing.
Examples
Bull Call Spread (debit)
=TradeMultiLegThinkOrSwim("NET_DEBIT", 2.50, "AAPL_011924C180", 1, "BUY_TO_OPEN", "AAPL_011924C185", 1, "SELL_TO_OPEN")Bear Put Spread (debit)
=TradeMultiLegThinkOrSwim("NET_DEBIT", 3.00, "AAPL_011924P185", 1, "BUY_TO_OPEN", "AAPL_011924P180", 1, "SELL_TO_OPEN")Credit Put Spread
=TradeMultiLegThinkOrSwim("NET_CREDIT", 1.50, "SPY_011924P470", 1, "SELL_TO_OPEN", "SPY_011924P465", 1, "BUY_TO_OPEN")Iron Condor (4 legs)
=TradeMultiLegThinkOrSwim("NET_CREDIT", 2.00, "SPY_011924P465", 1, "BUY_TO_OPEN", "SPY_011924P470", 1, "SELL_TO_OPEN", "SPY_011924C485", 1, "SELL_TO_OPEN", "SPY_011924C490", 1, "BUY_TO_OPEN")When to Use
- Executing vertical spreads through ThinkOrSwim
- Placing iron condors or iron butterflies via TDA
- Trading straddles or strangles on ThinkOrSwim
- Any multi-leg options strategy through TD Ameritrade
When NOT to Use
| Scenario | Use Instead |
|---|---|
| Single-leg option trade | TradeSingleLegThinkOrSwim() |
| Stock trade | TradeSingleLegThinkOrSwim() |
| Tradier broker | TradeMultiLegTradier() |
| Just need quotes | Option_Last_Price() |
Common Issues & FAQ
Q: What's NET_DEBIT vs NET_CREDIT? A: NET_DEBIT = you pay money (buying spread). NET_CREDIT = you receive money (selling spread).
Q: How is TDA option format different? A: TDA: AAPL_011924C180 vs OCC: AAPL240119C00180000. TDA format is shorter.
Q: Why is my order rejected? A: Check:
- Options approval level for complex strategies
- Margin/buying power requirements
- Valid TDA option symbols
- Price reasonableness
