Skip to main content

Alert settings

To run Gunbot with the TradingView add-on, only the settings below apply. Standard strategy and pair settings are ignored unless TV_GB is enabled.

TradingView alert configuration settings in Gunbot

Trading limits for buy orders come from configuration settings, but you can override them by including a trading limit in the alert message.

Orders placed by the TradingView add-on are market orders by default to ensure fills. You can optionally send limit orders instead.

tip

Webhooks

Add at least one pair for each exchange where you want to execute alerts. This establishes exchange connectivity.

This can be any pair; the add-on will not use it. Only with TV_GB enabled will pairs also cycle and process strategy settings.

Emails

Add all pairs you want to execute alerts on. Only with TV_GB enabled will pairs also cycle and process strategy settings.

Gain

Set the minimum gain (%) that TradingView-initiated trades must meet when TV_PROTECTION is enabled.

If a TradingView sell alert would yield lower gain than this value, Gunbot will not place the order. Use this to prevent selling at a loss.

warning

Only works for spot trading.


Market orders

Orders are sent as market orders by default.

Disable this option to send limit orders instead. Buy orders use the best bid price in the order book; sell orders use the best ask price.


Trading Limit Buy

Defines the trading limit for each buy order placed through the add-on.

The default value of 0.002 places orders of 0.002 BTC on a BTC-x pair.

When not using TV_PYRAMID, a sell alert places a sell order for the full quote balance held.

tip

Bitmex: enter the desired number of contracts

Other margin exchanges: enter an amount in quote currency


Trading Limit Buy Pyramid

Defines the trading limit for each pyramid buy order placed through the add-on.

The default value of 0.002 places orders of 0.002 BTC on a BTC-x pair.

tip

Bitmex: enter the desired number of contracts

Other margin exchanges: enter an amount in quote currency


Pyramid

Set to true to enable pyramid trading. The amount for each pyramid order is defined by TV_TRADING_LIMIT_SELL or TV_TRADING_LIMIT_BUY_PYRAMID.


Trading Limit Sell

Defines the trading limit for sell orders when TV_PYRAMID is enabled.

The default value of 0.002 places orders of 0.002 BTC on a BTC-x pair.

tip

Bitmex: enter the desired number of contracts

Other margin exchanges: enter an amount in quote currency


Protection

When set to true, Gunbot checks for overall profit before selling, as specified in TV_GAIN.

When set to false, Gunbot executes all TradingView alerts without interfering with a custom strategy.

tip

Only works for spot trading.


Close all

When enabled, an entire position is closed on a close command, even if the position exceeds the set trading limits.

tip

Only works for margin trading.


Trading Limit Cap

Maximum amount of base currency to invest in a pair.

tip

Only works for spot trading


Stoploss Percentage

Percentage below average bought price at which a sell signal overrides TV_PROTECTION and sells in a stop-loss manner.


Trading Limit All-In

When set to true, each buy order uses all available base currency balance.


Retry Order

Enable this if you have problems receiving multiple alerts. Gunbot will retry processing orders for 15 minutes.


TV MVTS

Sets a threshold for sell orders. If you own less than the set amount, sell orders are skipped and the TradingView bot returns to buying mode.


TV GB

Enable this to run Gunbot strategies alongside the TradingView add-on, mixing strategy trades with TradingView alerts.

The IMAP listener must be enabled to use this option.


TV Leverage

For margin trading only. Sets leverage for opening any position. Setting 0 uses cross margin if your exchange supports cross leverage.

Use values supported by your exchange only.

tip

On some exchanges you may need to set leverage on the exchange itself. Always test that this works as expected.


TV Lending

Sets the maximum acceptable lending rate when opening a position. The default of 0.02 stands for 2% interest per day.

tip

Only works on Poloniex.