TradingView
BigBitsIO
16 janv. 2020 20:45

Custom Alert Message With alertcondition Example [BigBitsIO] 

Bitcoin / United States DollarCoinbase

Description

This was a follower suggested script. This script shows an example of how to create a custom alert message using the alertcondition() function in pine.

Features:
- Well documented code with links to documentation for specific functions.
- Two alertconditions in a different order than the plots they reference to show the importance of plot IDs.

In order to actually get an alert with this script, you must create an alert through TradingView and reference this indicator and then reference the specific alert condition you want that alert to use.

For more information, contact me on social media or check YouTube for the associated video.

*** DISCLAIMER: For educational and entertainment purposes only. Nothing in this content should be interpreted as financial advice or a recommendation to buy or sell any sort of security or investment including all types of crypto. DYOR, TYOB. ***

Notes de version

I added some comments.

Notes de version

Update to include examples of referencing plot values by their name instead of their ID. With this method, you shouldn't have to worry about what order you plot data to reference later. Details in the script comments.
Commentaires
kurtsmock
Very helpful. Thanks
mannines
Hi wondering if you could heklp me please. Having troublr writing an alert for my shooting star indicator. Just want an alert so I can set it with the alert function.

study(title = "Shooting Star", overlay = true) barcolor(open[1] < close[1] ? open > close[1] ? high - max(open, close) >= abs(open - close) * 3 ? min(close, open) - low <= abs(open - close) ? yellow :na :na :na :na )
plugnprofits
@mannines, Hey mate, did you end up getting it to work?
jmnz1988
H= high
L = low
C=close
Spread = (H-L)
Avgspread = sma(spread, 40)
wideRangeBar = spread >(1.5 *Avgspread)
downclose = C<=((spread*0.3)+L)
Upthrust = wideRangeBar and downclose and H>H[1]
How to create screenerfunc ()=> for Upthrust
John4146
Great job mate! ...
Plus