Skip to main content

Email alerts

The Gunbot TradingView add-on executes trading alerts from custom TradingView strategies by processing email signals. It can also execute trades from any email alerts, so TradingView is optional.

Alert message contents

Gunbot requires alerts in a specific format. Put the alert text in the email subject line and use the standard pair syntax for regular Gunbot trading.

Some alerts can define specific trading limits. Otherwise, Gunbot uses the trading limits set in your TradingView settings.

Consider enabling the email-to-SMS option on tradingview.com to receive plain text emails instead of HTML-formatted messages.

Replace EXCHANGE with the name of your exchange.

For spot exchanges

Alert messageAction
BUY_EXCHANGE_BTC-ETHBuy ETH using BTC
BUY_EXCHANGE_BTC-ETH_0.1Buy ETH using BTC with a trading limit of 0.1 BTC
SELL_EXCHANGE_USDT-BTC

Sell BTC for USDT

  • Normal situation: full balance is sold
  • When usingTV_PYRAMID, the amount is defined byTV_TRADING_LIMIT_SELL
  • When using MULTIPLE BASE, the amount is the same as the last buy order made by the bot on the same trading pair
STOPLOSS_EXCHANGE_BTC-ETHSell ETH for BTC if stoploss is triggered
BUY_EXCHANGE_USDT-BTC_amount_rate

Buy BTC using USDT for a specified amount in USDT

at a specified rate. Requires TV market orders to be disabled.

BUY_EXCHANGE_BTC-ETH_0_rate

Buy ETH using BTC for "TV trading limit buy"

at a specified rate. Requires TV market orders to be disabled.

For futures / margin exchanges

Alert messageAction
LONG_EXCHANGE_XBT-USDLong order for XBT-USD
SHORT_EXCHANGE_XBT-USD_amountShort order for XBT-USD with a specified trading limit
LONG_EXCHANGE_XBT-USD_amountLong order for XBT-USD with a specified trading limit
LONG_EXCHANGE_XBT-USD_amount_rate

Long order for XBT-USD with a specified

trading limit and rate. Requires TV market orders to be disabled.

SHORT_EXCHANGE_XBT-USD_0_rate

Short order for XBT-USD without

a specified trading limit and with a specified rate.

Requires TV market orders to be disabled.

CLOSE_EXCHANGE_USDT-LTCClose a margin position (made for bitmex, not supported on every exchange)
CLOSELONG_EXCHANGE_XBT-USDClose a long position (made for bitmex, not supported on every exchange)
CLOSESHORT_EXCHANGE_XBT-USDClose a short position (made for bitmex, not supported on every exchange)
tip
  • Orders in the opposite direction of a position can be used to (partially) close positions.
  • Want to flip between long and short? Open one position manually, then send long and short alerts at 2x that position size to keep flipping between long and short.

Change strategy by alert

Use alerts to change the strategy of any valid pair already in your config.

Alert messageAction
STRAT_BITMEX_XBT-USD_yourstratnameAssigns strategy yourstratname to XBT-USD