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 message | Action |
|---|---|
BUY_EXCHANGE_BTC-ETH | Buy ETH using BTC |
BUY_EXCHANGE_BTC-ETH_0.1 | Buy ETH using BTC with a trading limit of 0.1 BTC |
SELL_EXCHANGE_USDT-BTC | Sell BTC for USDT
|
STOPLOSS_EXCHANGE_BTC-ETH | Sell 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 message | Action |
|---|---|
LONG_EXCHANGE_XBT-USD | Long order for XBT-USD |
SHORT_EXCHANGE_XBT-USD_amount | Short order for XBT-USD with a specified trading limit |
LONG_EXCHANGE_XBT-USD_amount | Long 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-LTC | Close a margin position (made for bitmex, not supported on every exchange) |
CLOSELONG_EXCHANGE_XBT-USD | Close a long position (made for bitmex, not supported on every exchange) |
CLOSESHORT_EXCHANGE_XBT-USD | Close a short position (made for bitmex, not supported on every exchange) |
- 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 message | Action |
|---|---|
STRAT_BITMEX_XBT-USD_yourstratname | Assigns strategy yourstratname to XBT-USD |