Page 1 of 1
Discord alerts
Posted: Wed Mar 02, 2022 2:36 pm
by meghobrial
Hey everyone. I am new to this community. I have an indicator with standard alerts but I'm not sure how to modify it to allow for Discord alerts. can someone help please?
Re: Discord alerts
Posted: Thu Mar 03, 2022 8:03 pm
by processingclouds
hEY,
1. Go to discord
2. Create a new channel where you want alerts (optional)
3. Edit Discord Settings
4. Click Integrations
5. Click New Webhook
6. Give it a name, and choose a channel
7. Copy the URL for webhook shown
8. Create a tradingView alert
9. Put check on webhook
10. Paste the URL (copied from discord)
11. Put your alert message in json format ( Discord likes that :) )
Re: Discord alerts
Posted: Mon Mar 07, 2022 1:21 pm
by meghobrial
yes this is the standard way but I got the 'Function call' alert types .. you can't use JSON format on that
Re: Discord alerts
Posted: Mon Mar 07, 2022 10:52 pm
by processingclouds
Can you put the code, or part of the alert code, so i understand what Function Call you are talking about .?
Re: Discord alerts
Posted: Thu May 18, 2023 12:04 pm
by mota
hello guys I hope that you are all doing well, I have some troubles with sending alerts from my trading strategies to my discord,
I want to receive the following content from my trading strategies: ticker, exchange, time, strategy order, order price, take profit levels and stop loss levels, I tried to include many json formats in tradingview but I still couldn't figure it out.
for example: {"content": "{{ticker}} {{exchange}} {{timenow}} {{strategy.order.action}} {{strategy.order.price}}{{strategy.order.size}} {{strategy.order.alert_message}} {{plot(\"Short SL\")}} {{plot(\"Short TP\")}} {{plot(\"Long SL\")}} {{plot(\"Long TP\")}}" }
here's what I receive on discord: BTCBUSD BINANCE 2023-05-10T19:03:51Z buy 27601.79 Exit or Close BOT API for exiting SHORT positions. TP: {{valuewhen(strategy.position_size > 0, plot('Long TP'), 0)}} SL: {{valuewhen(strategy.position_size > 0, plot('Long SL'), 0)}}
I can't receive the order size, take profit levels and take loss levels. Can you please tell me what to include in tradingview message alerts to receive the proper output in my discord channels.
Thanks in advance guys
Re: Discord alerts
Posted: Sat Jan 27, 2024 1:11 pm
by ccfos
hello! i want the solution too if you have it. I have the same problem. i used the any alert() function