Limit command
What it does
Section titled “What it does”limit places a limit order.
You can drive the limit price from:
offsetprice
Use TradingView Order Syntax first if you need the full command structure before working through individual command types.
Minimal syntax
Section titled “Minimal syntax”ALPHA(BTCUSDT){type=limit,side=buy,amount=0.001,offset=-1%}Typical fields
Section titled “Typical fields”type=limitside=buyorside=sellamount=...position=...offset=...price=...reduceOnly=truepostOnly=truetp=...sl=...tag=...
Buy below market
Section titled “Buy below market”ALPHA(BTCUSDT){type=limit,side=buy,amount=0.001,offset=-1%}Sell above market
Section titled “Sell above market”ALPHA(BTCUSDT){type=limit,side=sell,amount=0.001,offset=1%}Use an absolute price
Section titled “Use an absolute price”ALPHA(BTCUSDT){type=limit,side=buy,amount=0.001,offset=@68000}or:
ALPHA(BTCUSDT){type=limit,side=buy,amount=0.001,price=@68000}Reduce-only limit exit
Section titled “Reduce-only limit exit”ALPHA(BTCUSDT){type=limit,position=0,offset=1%,reduceOnly=true}Limit with TP and SL
Section titled “Limit with TP and SL”ALPHA(BTCUSDT){type=limit,side=buy,amount=0.001,offset=-1%,tp=1%,sl=0.5%}About postOnly
Section titled “About postOnly”If you do not specify postOnly, the current execution flow defaults limit orders toward post-only behavior in the common limit path.
If you want to be explicit, set it yourself:
postOnly=trueOffset vs price
Section titled “Offset vs price”offset=...
Section titled “offset=...”Relative to current or reference price.
Examples:
offset=1%offset=-1%offset=@68000offset=e1%price=...
Section titled “price=...”Explicit order price or price token.
Examples:
price=@68000price=1%price=e1%Common mistakes
Section titled “Common mistakes”Invalid offset
Section titled “Invalid offset”If the offset cannot resolve into a valid price, the command is skipped.
Post-only on a crossing price
Section titled “Post-only on a crossing price”A post-only order can be rejected if it would take liquidity immediately.
Using position=0 without reduceOnly=true
Section titled “Using position=0 without reduceOnly=true”For exit-style workflows, that can produce the wrong order semantics.