TradingView Signal Strategy

WolfBot can trade on every alert coming from TradingView.com. This includes their CrytoScreener, built-in Indicators and even custom PineScripts.

So if you are familiar with TradingView, you can make WolfBot your trading backend for all your work you are doing on their site.
WolfBot furthermore allows some advanced configuration of how to act on TradingView signals. For example if you only want to trade in a certain direction or only on signals containing a specific keyword you can do so.

Screenshot of the TradingView strategy configuration in WolfBot:

When creating an alert on TradingView.com you must include a buy or sell word (which you configured in the screenshot above). So for example to tell WolfBot to buy BTC once it crosses 3629 USD the alert looks like this:

“Price” crossing a pre-defined value is just the most simple alert as an example. You can create more advanced alerts for every indicator on TradingView – including alerts for your own PineScripts.
You must include the currency pair in your message!

Limit Orders:
Your messages can also include “limit=123.45” to specify a limit order price.

Market Orders:
To use market orders, write market=1 in your alert.
If neither limit nor market orders are specified, the rate of the last trade will be used.

Amount:
You can also specify a different trading amount by writing adding amount=123 to your message (in base currency, USD,…).

Specify minimum profit (for CLOSE signals):
Use pl=500 to enter a minimum profit condition in your close signal (in base currency such as USD, so minimum 500 USD profit in this example). The pl amount can also be negative (for example pl=-100).
If this condition is not met, the position will not be closed and the signal will be discarded. WolfBot will have to receive another CLOSE signal to close it.

Immediate Order execution:
The default configuration includes: tradeStrategy: RSIScalpOrderer
This means that orders will be forwarded to a 3min RSI strategy and

  • buy orders will be executed after RSI low ended
  • sell orders will be executed after RSI high ended

The default configuration will wait for a 5min candle RSI to confirm the trend to execute the trade signaled from TradingView.
To have signals from TradingView executed immediately you must remove the RSIScalpOrder from the TradingViewSignal configuration (leave it blank). For more details to adjust the RSI parameters, please read the RSIScalpOrderer parameter descriptions on the configuration page.

Setup TradingView using Webhook URL:
TradingView Pro users can use Webhooks, which means TradingView will call WolfBot directly with the alert. This is the most reliable and fastest way to trade.
To setup Webhooks for WolfBot, you just have to enter the following Webhook URL in your TradingView alerts:
https://wolfbot.org/wp-json/tradebot/v1/trade-signal/?t=YOUR_BOT_TOKEN
You can find YOUR_BOT_TOKEN on the Status page (under Actions -> Status).

Setup with @wolfbot.org email address:
You can also setup TradingView alerts using our email servers. To do this:

  1. enter [email protected] as an email address on TradingView.com for their “Send Email-to-SMS” feature (see screenshot above)
  2. enter [email protected] as an email address in your wolfbot.org cloud instance, leave the password empty
  3. in WolfBot go to Actions -> Status and add your “Bot ID” to the message text of ALL your TradingView alerts. The BotID starts with “WID”:

So your message Text could look like: BTCUSD crossing 6000, buy, WIDnRc/ERRQ, limit =6010
The order in your message text doesn’t matter.

Testing:
The best way to test if your signals work as intended is to set the trading capital in WolfBot to 0 (tradeTotalBtc on the configuration page). Then just send your alerts from TradingView and see what WolfBot says in the log (the blue arrow down right).

Example alert messages:

  • buy USD_BTC WIDnRc/ERRQ
    Just buys bit Bitcoin on the USD_ BTC market (always use WolfBot pairs, not pairs such as XBTUSD). This will use a limit order with the last trade price as rate. The exchange and trading capital is used from WolfBot config.
  • sell BTC_ETH, market=1, WIDnRc/ERRQ
    Sells Ethereum on the BTC_ETH market using a market order.
  • buy USD_ETH, limit=200.5, WIDnRc/ERRQ
    Buys Ethereum with a limit order of rate 200.5 USD.
  • sell USD_ETH, limit=210.1, amount=600, WIDnRc/ERRQ
    Sells Ethereum with a limit order of 210.1 USD and a custom base amount of 600 USD.
  • buy USD_BTC, spread=[-0.01, 0.005], WIDnRc/ERRQ
    Places 2 buy orders: One 0.01% below the last trade price and another 0.005% above. The trades are placed immediately as limit orders and in the order they are specified in the “spread” parameter.
    The total order amount (from WolfBot config or signal parameter) will be equally divided into multiple pieces.
  • buy USD_BTC, limit=9800.0, spread=[-0.01, -0.02, 0.0, 0.005, 0.01], WIDnRc/ERRQ
    Places 5 buy orders: Starting -0.01% below the specified limit price (9800.0 USD)…
  • sell USD_BTC, limit=9800.0, amount=50%, WIDnRc/ERRQ
    Places a limit sell order to take profit with 50% of the currently open position amount (at the time of the signal).
  • sell USD_ETH, pl=50, amount=600, WIDnRc/ERRQ
    Sells 600 USD worth of ETH at the rate of the last trade if the existing position has at least 50 USD profit (or if there is no existing position). This is useful for swing trading together with the global WolfBot config setting flipPosition=true
  • close USD_BTC, WIDnRc/ERRQ
    Closes an existing USD_BTC position (if any). Otherwise does nothing.
  • close USD_ETH, pl=200, WIDnRc/ERRQ
    Closes an existing USD_ETH position if it has at least 200 USD profit. Otherwise this signal is ignored and must be sent again later to close the position.

Commas and the order of parameters are optional.

Note to Gmail users:
We recommend using our pre-configured @wolfbot.org email address for TradingView alerts. Gmail can be unreliable for signals because it might ban WolfBot when logging in from different locations or asking for new mails too often.
If you still want to use gmail (might apply to other 3rd party mail services too):
You should be sure to enable access to Less Secure Apps in your Gmail account to ensure WolfBot can fetch mails quickly (without getting temporarily banned by Gmail).
Obviously, you can also create a new mail account just for WolfBot and use it for your TradingView account.


Happy Trading!