TradingView webhook recipes
This page is recipe-first on purpose. For the main syntax hubs, start with TradingView webhook format and TradingView order syntax.
Open a long
Section titled “Open a long”ALPHA(BTCUSDT){type=market,side=buy,amount=0.001}Open a short
Section titled “Open a short”ALPHA(BTCUSDT){type=market,side=sell,amount=0.001}Close full position
Section titled “Close full position”ALPHA(BTCUSDT){type=market,position=0}Reduce current position
Section titled “Reduce current position”ALPHA(BTCUSDT){type=market,side=sell,amount=50%p,reduceOnly=true}Set target position
Section titled “Set target position”ALPHA(BTCUSDT){type=market,position=0.003}Place a limit order
Section titled “Place a limit order”ALPHA(BTCUSDT){type=limit,side=buy,amount=0.001,offset=-1%}Cancel and replace
Section titled “Cancel and replace”ALPHA(BTCUSDT){ type=cancel; wait(1s); type=limit,side=buy,amount=0.001,offset=-1%}Entry, wait, then place exit
Section titled “Entry, wait, then place exit”ALPHA(BTCUSDT){ type=market,side=buy,amount=0.001; wait(3s); type=limit,position=0,offset=1%,reduceOnly=true}TP / SL example
Section titled “TP / SL example”ALPHA(BTCUSDT){type=market,side=buy,amount=0.001,tp=1%,sl=0.5%}What to check after each task
Section titled “What to check after each task”- the token hit the expected connection
- the bot name matched
- the symbol resolved correctly
- the final size was valid
- the exchange outcome matched the intent
Need exact syntax instead of recipes? Move to TradingView order syntax, or open TradingView webhook examples if you want more copy-ready patterns first.