Skip to content

Cancel command

cancel cancels working orders for the current symbol.

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

ALPHA(BTCUSDT){type=cancel}

A very common pattern is:

  1. cancel existing orders
  2. wait briefly
  3. place a fresh order

Example:

ALPHA(BTCUSDT){
type=cancel;
wait(1s);
type=limit,side=buy,amount=0.001,offset=-1%
}

Use cancel when you want to clear old resting orders before sending a new setup.

cancel only manages working orders. It does not flatten the position by itself.

cancel applies in the context of the current payload symbol.