TradingView Dynamic Alerts (paving the way for automated trading)

Introduction

TradingView official documentation is very well documented for dynamic alerts.

All our TradingView indicators are compatible with dynamic alerts/webhooks and automated systems.

The Trade Manager included in our Algorithm Builders provides real-time entries/stop-loss/take-profits/trailing/hard exits/... usable in systems capturing alerts such as ProfitView, 3commas, etc.)

Adding price values in alerts

Let's start with an example alert message text

The current price of {{ticker}} is {{close}}!

When an alert with this message text is sent to you, {{ticker}} will be replaced with the ticker symbol that the alert was set up on. {{close}} will be replaced with the close price on the current candle. So the message your receive might look more like this

The current price of XBTUSD is 10000!

Here is a list of all the standard values that you can now drop into your alert messages

Placeholder Replaced with
{{open}} The opening price of the current candle.
{{high}} The high price of the current candle.
{{low}} The low price of the current candle.
{{close}} The closing price of the current candle. i.e., the current price
{{volume}} The volume on the current candle.
{{time}} The current bar time (in ISO8601 format, eg: 2019-10-01T15:52:00Z)
{{timenow}} The exact time the alert was sent from TradingView (in ISO8601 format, eg: 2019-10-01T15:52:00Z)
{{ticker}} The current ticker (eg XBTUSD).
{{exchange}} The exchange the ticker is from (eg BINANCE).

How to use with the Algorithm Builders/Trade Manager indicators?

Now, what everyone is waiting for

You can also refer to the names of each of the plots, which can easier to use. The name is the title given to the plot in Pinescript.
For the Algo Builders/Trade Manager, you'll have to use the exact names from table below as that's how we called them in our indicators.
Let's review the indicator names to be used in dynamic alerts.
The Trade manager alerts track a Stop Loss price, a trailing-stop, an hard-exit/invalidation price, an entry price and 2 Take Profit2 price for you. Ideally you want to be able to send out the SL and TPs and Hard Exit values with the alert, so you can either auto-trade using those values, or use them in manual trading.

Trade Manager Plot Name Replaced with
{{plot("Entry Level")}} The Entry Level price
{{plot("SL Plot")}} The Stop Loss price
{{plot("TP1 Plot")}} The Take Profit 1 price
{{plot("TP2 Plot")}} The Take Profit 2 price
Trade Manager Plots

A few examples...

We won't go in to too many details because the syntax vary for each third-party using TradingView alerts.
In the examples below, we refer to a lookalike ProfitView syntax. The concept stays similar for other third-parties.

Market Long/Short with a 2% qty

The entries events are already created (more info in the section below)

c=position b=short t=market qty=2%

Limit Long/Short

⚠️ Useful if we want a pullback before getting in a trade

c=position b=long t=limit price={{plot("Entry Level")}}

Stop Loss

c=position b=short t=market stop ={{plot("SL Plot")}}

Take Profit 1&2 and Stop Loss

c=position b=short t=market stop ={{plot("SL Plot")}} takeprofit1={{plot("TP1 Plot")}} takeprofit2={{plot("TP2 Plot")}}

🔔 Alerts 🔔

When the settings change, the alerts already created aren't updated automatically.

If you change any settings, you'll have to delete the alert(s) related to that setting and recreate it/them.
For example, let's assume you would change the stop-loss of your trade manager but already created an alert for it days ago.
As the previous alert is based on your previous configuration, you'll have to recreate it.

Please let us know if that doesn't make sense to you.

Tradingview Alerts Settings

The screenshot should be self-explanatory enough

You mandatory need to create 1 Once per Close alert for the BUY event and 1 Once per close alert for the SELL event

The Algorithm Builders allow to capture the alerts on those BUY green triangles and SELL red triangles.

You'll have to create 1 alert per event (buy or sell) per asset (BTC, DOW, APPL, ...) per timeframe (m5, m15, ...).

For instance, if you add your Algorithm Builder to your chart. You have to create 2 alerts. A first one to capture the MAIN BUY event, a second one to capture the MAIN SELL event.

According to your TradingView subscription type, you might receive the alerts by email and by SMS

More information to create and manage custom alerts here

Hard Exits alerts
Alerts Hard Exit

Hard Exits BUY, and SELL alerts must be with the Once per bar close option.
The framework is made to invalidate when the hard exits sub-indicators give the signal, at the end/close of the m1 candle.

Trade Manager alerts
Trade Manager alerts

You'll be able to create alerts based on our Trade Manager. It's recommended to wait to be in a trade, and after creating the Trade Manager alerts.

As we could recommend to trigger the BUY/SELL alerts on candle close (for more security/less risk for fakeouts), it's generally a best practice to set the Trade Manager alerts using the Only Once or Once per bar because traders want to exit their trades at a specific price in real-time.

We mean, once the SL/TP1/TP2 are hit, you might not want to wait for the candle close to act, because it could be too late, and very often won't be in the trader favor.

Values used for custom indicators?

Yes, that's possible too.

Let's say you have a custom indicator that gives you signals to open and close positions, and tracks other custom events.

Below are the placeholders for plotted values in your custom indicators

Placeholder Replaced with
{{plot_0}} The value of the first plot in your indicator.
{{plot_1}} The value of the second plot in your indicator.
... and so on...