How can I add stop loss and take profit section in Tradingview alarm message. I guess this can be done using plot

How can I add stop loss and take profit section in Tradingview alarm message?

I want to use it in study app, not in strategy

enter image description here

Upvotes: 0

Views: 448

Answers (1)

vitruvius
vitruvius

Reputation: 21362

Plot your TP and SL like below:

plot(tp_price, "TP")
plot(sl_price, "SL")

Then you can use the name of the plots in your alert message:

alertcondition(your_condition_here, "Alert Title", "TP: {{plot("TP")}}, SL: {{plot("SL")}}"

See this for more details.

Upvotes: 1

Related Questions