Skip to content

Trailing limit command

trailingLimit tracks price movement and manages a working limit order using a minimum and maximum offset range.

This is more advanced than market or limit.

Use TradingView Order Syntax first if you need the full command structure before working through individual command types.

  • type=trailingLimit
  • amount=...
  • position=...
  • minOffset=...
  • maxOffset=...
  • reduceOnly=true
  • postOnly=true
  • background=true or false
  • timeLimit=...
  • slippageLimit=...
  • onLimitAction=...
ALPHA(BTCUSDT){
type=trailingLimit,
position=0,
minOffset=0.20%,
maxOffset=0.40%,
reduceOnly=true,
background=false
}

If background=true, the trailing process keeps running in the background after the command starts.

If background=false, the execution stays in the foreground.

Use trailingLimit when you want:

  • a dynamic working exit
  • a moving passive order
  • a more controlled follow-up than a plain fixed limit

Do not use trailingLimit as your first command type.

Start with:

  • market
  • limit

Then move to trailingLimit after you already trust your payload flow and Console verification process.

If the offset values cannot resolve cleanly, the command may fail or be skipped.

Starting with a complex trailing workflow too early

Section titled “Starting with a complex trailing workflow too early”

Get the basics working first, then add trailing logic.

Always verify in Console whether the trailing process is running in background or foreground.