Skip to main content

Advanced Trade Options

A trade command can carry far more than direction and size: leverage, layered take-profits, DCA ladders, limit-order chasing, conditional guards, precise timing. The pages in this section document every advanced field, grouped by what it controls.

You rarely need these by hand

The Trade Command Builder sets these fields for you. Reach for these pages when you want a specific behaviour, when you hand-write a payload, or as a lookup alongside the Parameter Reference.

The field categories

The 84 trade-command fields fall into 12 groups, each with its own page:

CategoryCountDetail page
Core (routing, direction, auth)12Core Parameters
Sizing6Sizing
Stop Loss + trailing11Stop Loss
Take Profit6Take Profit
Futures / derivatives9Futures Options
DCA + Scaled orders9DCA & Scaling
Limit-order management8Limit Order Management
Conditional logic10Conditional Logic
Close & Cancel7Close & Cancel
Timing & Idempotency3Timing & Idempotency
Math expressions2Math Expressions
LimitOrder sub-shape5covered in Take Profit

The counts overlap slightly: stopLossExpression and takeProfitExpression are each listed under both Math expressions and their risk category, and the 5 LimitOrder sub-fields live inside targets[] rather than at the top level. Net unique top-level fields: 84. The Parameter Reference renders the full deduplicated list.

Worked examples and footguns

  • Examples — complete Pine + JSON pairs for common setups.
  • Gotchas — the footguns the parameter table can't warn you about. Read before going live.

How the server reads your command

Before any of these fields reach the exchange, TVH runs a fixed auto-mapping step: it can derive direction from orderType, force a close from strategyComment, and evaluate math expressions. When a payload behaves unexpectedly, that step is usually why. The full breakdown is in Trade Command Anatomy & Auto-Mapping.