It is necessary to adjust the text slightly based on what the strategy or alert condition is because TradingView does not dynamically set this.
It is necessary to first view this page to understand how to use these examples:
https://verrillotrading.com/tradingview-telegram-chart-alerts/
Strategy Alert – HTML Formatting
{ "chat_id": "-1001557258327", "text": "TradingView Strategy Alert\n\nBarUpDn Strategy (1): order {{strategy.order.action}} @ {{strategy.order.contracts}} filled on {{ticker}}. New strategy position is {{strategy.position_size}}\n<a href=\"https://www.tradingview.com/chart/XWj7PKbW/\">View the Chart Here</a>", "parse_mode": "HTML", "link_preview_options": { "is_disabled": true } }
Simple Price Alert with Markdown Formatting
{
"chat_id": "-1001557258327",
"text": "*Tradingview Price Alert*\n{{exchange}}:{{ticker}}\nPrice = *{{close}}*\n[View the Chart Here](https://www.tradingview.com/chart/XWj7PKbW/)",
"parse_mode": "Markdown",
"link_preview_options": {
"is_disabled": true
}
}
Indicator Alert with HTML Formatting
{
"chat_id": "-1001557258327",
"text": "Indicator Alert\n\nSymbol = {{exchange}}:{{ticker}}\nPrice = {{close}}\nIndicator value = {{plot_1}}\nView the Chart Here",
"parse_mode": "HTML",
"link_preview_options": {
"is_disabled": true
}
}
Indicator Alert with Markdown Formatting
{
"chat_id": "-1002275469831",
"message_thread_id": "2",
"text": "*RSI Indicator Alert*\n\nSymbol = *{{exchange}}:{{ticker}}*\nPrice = *{{close}}*\nIndicator value = *{{plot_1}}*\n[View the Chart Here](https://www.tradingview.com/chart/XWj7PKbW/)",
"parse_mode": "Markdown",
"link_preview_options": {
"is_disabled": true
}
}
If you require a more reliable way of testing if your TradingView to Telegram alerts are failing, I recommend to use curl with a json file that can be passed in to the curl command.
1. Create a file named message.json and paste one of the code examples above into it:
2. Run this command in a terminal starting from curl:
curl -X POST \
“https://api.telegram.org/bot8168101624:AAE3YyF-Z060urwlusBYk0m2eCHfl8Tr1yQ/sendMessage” \
-H “Content-Type: application/json” \
–data-binary “@message.json”
Create a script to run that command based on your operating system.
Change the text in message.json file using a text editor, save and call the curl command to get a response from Telegram servers.
If you got value out of this, check out some of these links to support the channel:
✅ Explore My Top Broker Pick: https://verrillotrading.com/ibkr/
🔓 Unlock the Power of TradingView: https://verrillotrading.com/tradingview/