Skip to main content

TradingView Cheatsheet

Copy-paste templates for TradingView alerts.

Essential Templates

Market Entry (Risk-Based) ⭐

BUY, {{ticker}}, RISK=2, SL=30, TP=60, TPSLType=PIPS
SELL, {{ticker}}, RISK=2, SL=30, TP=60, TPSLType=PIPS

Market Entry (Fixed Lots)

BUY, {{ticker}}, VOL=0.1, SL=30, TP=60, TPSLType=PIPS
SELL, {{ticker}}, VOL=0.1, SL=30, TP=60, TPSLType=PIPS

Exit Signals

CLOSE, {{ticker}}, SIDE=BUY
CLOSE, {{ticker}}, SIDE=SELL
CLOSEALL, ALL

Partial Close (Take Profit)

CLOSE, {{ticker}}, SIDE=BUY, PERCENT=50

Placeholder Reference

TradingView replaces these with actual values when alert triggers:
PlaceholderReplaced WithExample
{{ticker}}Symbol nameEURUSD
{{close}}Candle close price1.09523
{{open}}Candle open price1.09500
{{high}}Candle high price1.09600
{{low}}Candle low price1.09450
{{volume}}Volume125000
{{time}}Timestamp2024-01-15 10:30
{{interval}}Timeframe15

Dynamic SL/TP Examples

SL at Candle Low, TP at Recent High

BUY, {{ticker}}, VOL=0.1, SL={{low}}, TP={{high}}, TPSLType=PRICE

Pending Order at Close Price

BUYLIMIT, {{ticker}}, PRICE={{close}}, VOL=0.1, SL=30, TP=60, TPSLType=PIPS

Trail Stop to Current Low

MODIFY, {{ticker}}, SIDE=BUY, SL={{low}}, TPSLType=PRICE

Pine Script Alert()

Basic Strategy Alerts

//@version=5
strategy("My Strategy", overlay=true)

longCondition = ta.crossover(ta.sma(close, 14), ta.sma(close, 28))
shortCondition = ta.crossunder(ta.sma(close, 14), ta.sma(close, 28))

if (longCondition)
    strategy.entry("Long", strategy.long)
    alert("BUY, " + syminfo.ticker + ", RISK=2, SL=30, TP=60, TPSLType=PIPS")

if (shortCondition)
    strategy.entry("Short", strategy.short)
    alert("SELL, " + syminfo.ticker + ", RISK=2, SL=30, TP=60, TPSLType=PIPS")

Exit on Opposite Signal

//@version=5
strategy("Entry-Exit Strategy", overlay=true)

longCondition = ta.crossover(ta.rsi(close, 14), 30)
exitLong = ta.crossunder(ta.rsi(close, 14), 70)

if (longCondition)
    strategy.entry("Long", strategy.long)
    alert("BUY, " + syminfo.ticker + ", RISK=2, SL=30, TP=60, TPSLType=PIPS")

if (exitLong)
    strategy.close("Long")
    alert("CLOSE, " + syminfo.ticker + ", SIDE=BUY")

Alert Setup Checklist

1

Create Alert

Press Alt+A (Windows) or Option+A (Mac)
2

Set Condition

Choose your indicator/strategy trigger
3

Enable Webhook

✅ Check “Webhook URL” box
4

Paste TradeWzrd URL

https://tradewzrd.com/api/webhooks/YOUR_WEBHOOK_ID
5

Paste Signal in Message

Use templates above
6

Set Frequency

Choose “Once Per Bar Close” (recommended)
7

Create

Click Create button

Common Mistakes

❌ Wrong✅ Correct
BUY EURUSD VOL=0.1BUY, EURUSD, VOL=0.1
tradewzrd.com/api/...https://tradewzrd.com/api/...
{ticker}{{ticker}}
SL=30, TPSLTYPE=PIPSSL=30, TPSLType=PIPS
Webhook URL checkbox unchecked✅ Checkbox checked

Quick Copy Templates

Long Entry
BUY, {{ticker}}, RISK=2, SL=30, TP=60, TPSLType=PIPS
Short Entry
SELL, {{ticker}}, RISK=2, SL=30, TP=60, TPSLType=PIPS

Next Steps