You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thank you for your webhook Bot, it works perfect and was easy to setup.
I have a question about including variables into my alerts. Because of my script i get different alerts (buy, sell, close) and i wanted to create different types of messages which will be send to the Telegram Channel.
Thats inside my Message Box at Tradingview { "key": "mysecretkey", "telegram": "-XXXXXXXXXX", "msg": "Basic same title at ever msg. {{strategy.order.comment}}" }
Using the strategy.order.comment only in the msg works fine for me because i want to get all the other variables from the different actions.
The main problem is to get the variables shown up in the send msg correctly
`strategy.exit("Our #{{ticker}} BUY reached our TP/SL @ {{close}}USD, please close out the trade!", "LongPos", stop=longStop, limit=longProfit)
strategy.exit("Our #{{ticker}} SELL reached our TP/SL @ {{close}}USD, please close out the trade!", "ShortPos", stop=shortStop, limit=shortProfit)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First of all thank you for your webhook Bot, it works perfect and was easy to setup.
I have a question about including variables into my alerts. Because of my script i get different alerts (buy, sell, close) and i wanted to create different types of messages which will be send to the Telegram Channel.
Thats inside my Message Box at Tradingview
{ "key": "mysecretkey", "telegram": "-XXXXXXXXXX", "msg": "Basic same title at ever msg. {{strategy.order.comment}}" }
Using the strategy.order.comment only in the msg works fine for me because i want to get all the other variables from the different actions.
The main problem is to get the variables shown up in the send msg correctly
`strategy.exit("Our #{{ticker}} BUY reached our TP/SL @ {{close}}USD, please close out the trade!", "LongPos", stop=longStop, limit=longProfit)
strategy.exit("Our #{{ticker}} SELL reached our TP/SL @ {{close}}USD, please close out the trade!", "ShortPos", stop=shortStop, limit=shortProfit)
if (longCondition and timeCondition)
strategy.entry("LongPos", strategy.long, stop=longStop, oca_name="3xST", oca_type=strategy.oca.cancel, comment="BUY #{{ticker}} @ {{strategy.order.price}} USD TP {{plot('Long TP')}} SL {{plot('Long SL')}}")
else
strategy.cancel(id="LongPos")
if (shortCondition and timeCondition)
strategy.entry("ShortPos", strategy.short, stop=shortStop, oca_name="3xST", oca_type=strategy.oca.cancel, comment="SELL #{{ticker}} @ {{strategy.order.price}}USD TP {{plot('Short TP')}} SL {{plot('Short SL')}}")
else
strategy.cancel(id="ShortPos")`
Beta Was this translation helpful? Give feedback.
All reactions