We are happy to announce the release of our latest feature - TradingView Alerts based conditions.
Now, you can trigger your Capitalise.ai strategies based on TradingView alerts! This means a new world of possibilities, as EVERYTHING in TradingView can now be used to automate your trading with zero coding.
First, what is a TradingView Alert?
TradingView allows the creation of alerts based on any of the chart’s visual elements; lines, prices, indicators, but also sending alerts via the Pine script.
TradingView Webhook is a way of sending a message to a third party when an alert has been triggered.
How does an alert webhook works?
With any TradingView alert, you can select ‘Webhook URL’ under ‘Alert Actions’.
A Webhook is a way of sending a message to a specified url once your alert is triggered.
Each Webhook has 2 parameters:
URL: the web address to which the Webhook message will be sent.
A message: a JSON type list that consists of the Webhook ID
As it is a list, we can send multiple IDs and trigger multiple Webhooks.
When you create a Capitalise.ai strategy with a Webhook-Condition, the strategy will get triggered once your TradingView alert triggers.
How to add a TradingView alert to your trading strategy?
On the Capitalise.ai wizard, add the condition ‘Webhook’ to your trading strategy:
Once you write ‘Webhook’, you will receive a URL & unique message that refers solely to this webhook condition. Copy them into the required fields on the trading-view alert interface when defining the webhook. Now, when the alert triggers, your strategy condition related to this webhook will be triggered.
Let’s demonstrate with a VWAP trading strategy as an example
VWAP (volume-weighted average price) is a technical indicator used at times when looking to buy into the market below the markets’ average price, and sell above the markets’ average price. Using this logic, we can consider the following conditions as our trading strategy:
I will go long (buy) each time the price trades below the lower band of the VWAP indicator.
I would seek an entry after the first hour of the trading session, when the price settles, and up until 15:00 eastern time
I want to close the trade when the price crosses above the higher VWAP band or at a stop-loss of 5%
A trade will not remain open after the market official trading session
This is how the trade would look like on TradingView Charts:
In order to automate this trading strategy, we should follow these steps:
Set the appropriate entry strategy on the Capitalise.ai wizard:
“Between 10:30 AM and 15:00 eastern time if Webhook triggers buy 30 MRNA”
Click the word Webhook and then copy the URL and Message (MSG1)
Open TradingView and setup the Webhook trigger:
Add the VWAP indicator to your chart of choice
Open the Alert menu and set the trading-view alert:
Asset = MRNA
VWAP, Lower Band
Under “Options” choose “Once per bar” as we want it to trigger more than once (also in future bars) and ultimately create multiple trades over time. At the same time, we don’t wish to send more than 1 alert per bar.
It is better if we choose a chart time frame that is smaller than 1 hour.
Under Alert Actions choose “Webhook URL” and paste the address you copied on step 3.
On the message section, paste MSG1 you copied on step 3
Set the appropriate entry strategy on the Capitalise.ai wizard:
“Close position if Webhook triggers or at loss of 5% or at 15:59 eastern time”
Copy the URL and message (MSG2)
Open TradingView and setup the exit Webhook trigger – follow the same process but now for when price crosses above the upper VWAP.
Paste the URL and MSG2 under the Webhook URL section
Go back to Capitalise.ai, and set the strategy to run in loop mode (so it can continuously enter and exit the trade automatically)
Click ‘Next’ and verify your strategy on the confirmation page
Test your strategy risk-free using Simulation mode, or run it live and let Capitalise.ai execute your trades directly via your trading account.
While a strategy is on the entry phase, any webhook message received which belongs to the exit will be ignored. And vice versa, while a strategy is on the exit phase, any webhook message received which belongs to the entry will be ignored
Whenever a message is received for a certain webhook, that webhook condition will remain triggered until the entire strategy moves to the next phase (From entry to exit and vice versa)
Controlling multiple strategies from one alert
The Webhook is a powerful feature that opens up many opportunities, one of those is the option to trigger multiple automated strategies from a single alert. This option can be used to:
Trigger multiple conditions in multiple strategies I own:
For example, I can manage 2 identical strategies, one could be connected to my Binance account and the second one connected to my Interactive Brokers account. This way I can create a scenario that once triggered will buy 0.5 BTC/USDT in my Binance account and at the same time, buy 5,000 USD of GBTC in my Interactive Brokers account.
Risk management :
We can close all of our positions across all of our accounts with a single trigger.
Managing trading for family and friends:
If your friend provides you with a webhook ID from his Capitalise.ai strategy, you can manage his trading by sending an TradingView alert to this webhook.
And you can do that to multiple parties at the same time. Importantly, your friends keep full control of trade size, switching between simulated and real trading, and whether to keep running or stopping this automated managed strategy.
How does it work?
You see, the message we send is of a JSON type, in this JSON we send a list of IDs, This list can (and most times) be with just 1 ID, or, it can have multiple IDs.
A message containing 1 ID:
A message containing multiple IDs:
When sending multiple Webhook IDs, we can trigger many conditions at the same time.
There are several ways in which we can use TradingView alerts for trading automation:
On the position Entry stage
On the position Exit stage
On both stages
Combining it with other conditions
Building scenarios with multiple Webhooks
Creating an entry and exit stages that only have webhook as a condition – by this, you are basically using Capitalise.ai connectivity to multiple brokers as an execution agent while managing the execution timing all by yourself.
This new feature unlocks a world of opportunities. In a coming series, we will unveil the different strategies one can now apply using Capitalise.ai and TradingView Webhooks. Stay tuned!
*Please note that all screenshots and examples are only shown for the purpose of a technical demonstration and should not in any way be construed as recommending any type of trading strategy and they do not constitute any form of advice. Please click here for further explanation.