Skip to main content

I Want to Execute Complex Orders

Is this you?


Quick Answer

XeroLite supports:

Use the alert request format (v1.1 or v1.2) and set order_type and the right fields (e.g. price, sl_offset, tp_offset, trail_amt).


Setup (high level)

  1. Choose order type — e.g. MARKET, LIMIT, STOP, TRAIL.
  2. Set fields in your alert JSON — e.g. price for limit, sl_offset / tp_offset for stop-loss/take-profit, trail_amt for trailing stop.
  3. Use Alert Request Builder — Build a valid message and copy it into TradingView.
  4. Test with paper trading — Verify order execution and rounding before going live.

Order Types and Examples

TypeUse caseKey fields
MarketExecute immediately at best priceorder_type: "MARKET"
LimitBuy/sell at specific price or betterorder_type: "LIMIT", price
StopStop-loss or breakoutorder_type: "STOP", price (stop price)
Trailing stopLock in profit as price movesorder_type: "TRAIL", trail_amt (v1.2+)
ComboMain order + SL/TPMain order + sl_offset / tp_offset (or separate legs)

Price rounding is applied automatically to match IB rules.


See Also