Email alerts
The Gunbot TradingView add-on lets you carry out trading alerts sent from custom strategies on TradingView, giving you full control over your strategy on the platform. Gunbot gets trade signals via email and responds with trades.
Moreover, this add-on can execute trades from any email alerts, meaning that it is not mandatory to use TradingView.
Alert message contents​
Gunbot requires alerts to be in a specific format for it to take action. The alert text should be in the subject line of an email and follow the standard pair syntax used for regular Gunbot trading.
Certain alerts can have specific trading limits defined. For other alerts or those without specified amounts, the trading limits set in your TradingView settings will apply.
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 from long to short or vice versa.
Change strategy by alert​
You can use alerts to change the strategy of any valid pair that's already in your config.
This alert type can also be used to (indirectly) add pairs to Gunbot, using an AutoConfig job.
Alert message | Action |
---|---|
STRAT_BITMEX_XBT-USD_yourstratname | Assigns strategy yourstratname to XBT-USD |