TradingView
PineCoders
2 feb 2020 12:02

Alert Creation Framework - PineCoders FAQ 

Tesla, Inc.NASDAQ

Descrizione

This script provides a framework to add alerts to a script.

It uses a method and provides code that:
— Allows the indicator's users to select the plotting of markers representing the different conditions used to trigger alerts.
— Allows filtering of the markers on direction: both, longs only, shorts only.
— Uses a single alert for the indicator. It will trigger on any number of marker conditions selected by the user when the alert is configured. The user can thus create the combination that suits his needs.
— Includes the marker's number in the alert's message.

NOTES
— Alerts should usually be configured to trigger Once Per Bar Close to prevent false signals.
— See the Pine User Manual page on alerts.
— This code uses the Pine Script Coding Conventions.



Look first. Then leap.

Commenti
dinhchien
How to use Webhook with strategy alert?
I success send message Study''s Alert from Tradingview to Telegram. But Stratety''s alert with the same Webhook urls not work.
Thanks.
Algonize
@dinhchien, While creating strategy alerts simple write {{strategy.order.comment}} and create, it will post whatever message you written in strategy comment= part to your webhook.
dinhchien
@Algonize, Very thank you.
Algonize
@dinhchien, Your welcome
CUBYC
Hi
I did implemented code in my code and getting sometimes 1,2 or 3 in same place, is there any way where plotshape can be shown one under the other if I get 2 signals same time in my oscilator?
PineCoders
@CUBYC, Hi, Yes, you could use a technique like this one: pinecoders.com/faq_and_code/
Copy the whole snippet in your editor and you'll see the special character used to lift the lines up.
CUBYC
@PineCoders, I will try that , thank you so much for getting back to me.
duronic12
@PineCoders, Is there are way to plot Marker Name instead of Marker Number? Would appreciate and example if so as a bit stuck!
PineCoders
@duronic12, Hi, for this you could change the values of the argument text=" " of the plotshape() functions in lines 70-74. There you can replace "1", "2", etc. with any desired text, including the marker name.
For more details on the plotshape() function see: tradingview.com/pine-script-reference/v4/
Altro